I’m making some calculations with my UI so it can adapt accordingly to any resolution/ratio and fit some cameras to the viewport based on its canvas normalized position. I had to use the UI elements world position, even the canvas RectTransform.GetWorldCorners, etc.
Thing is that I noticed everything was returning 0 without changing my previously working code. After testing for a while I discovered it was because the canvas wasn’t ready at the moment I was calling those elements.
I’ve worked in Android and I know that at the start of an activity (like a scene in Unity) the views (like canvas) take some time to be measured and more to be drawn. So I guess something similar is happening here and I wanna know if there’s any event that captures that.
At the moment I made it wait some time before making my calculations as a work around, but that’s not a consistent solution.
Thanks to anyone who can give me a hint!