This is a (very delayed) followup from
http://www.tasharen.com/forum/index.php?topic=9751 but since that topic kind of went on a different tangent, I'm creating a separate post.
TL;DR is...
- Game loads up with this GUI area preemptively disabled
- GUI area is enabled for first time, nested UIScrollView.ResetPosition() runs in the same frame with no effect
- (Im guessing) Immediately afterward, in LateUpdate()? maybe, UIPanel anchors realign themselves (based on UIRoot size)
- GUI area is disabled and enabled again, ResetPosition() runs in same frame and works this time (and every additional time afterward)
I've tried running UpdateAnchors, Refresh, and a few other things immediately before calling ResetPosition but no luck. I
was nesting some anchors, but now have most anchors working off of UIRoot (when possible) rather than having a small anchor decency chain.
If I run ResetPosition() after 0.25 seconds instead of immediately after enabling the GUI area, it also works but looks hacky. Pretty sure the issue is that the anchors need to be refreshed before calling ResetPosition but I want to leave these areas disabled when not being used, for performance reasons.