I'm adding a bunch of table items to a table where each item has a label set to resize height. I then call Reposition on the table and ... the end result is that the items all have incorrect spacing.
I believe the issue is that NGUI needs to calc the labels bounds, and then needs to update the surrounding frames of the labels (sprites set to update relative to the label on Update()) *before* it can know how to correctly space the items for the table.
I've hacked around this issue by running this after having repopulated the table:
IEnumerator FixTable(){
yield return new WaitForEndOfFrame
(); yield return new WaitForEndOfFrame
(); table.Reposition();
}
(the double frame wait is needed)
So, this works but it's pretty ugly, causes nasty flicker while waiting on the fames to sort out all the positions. Is there any way to not need this? Something like a force reset of all the bounds before calling Reposition() maybe?