Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: nah0y on November 16, 2012, 09:16:29 AM
-
Hi !
Is there a way to hide everything in a UITable before the Reposition is complete for example ?
Right now, I have 2-3 frames were you can see that everything is misplaced and then perfect :(
-
I haven't tried it, but I believe you can loads them inactive (so they are not seen), adjust them (they should still have their shape you can see in the scene view), then loop through and turn them back on? Not sure if you'd see them all turning back on one at a time or not, though.
-
Well, I don't really know how I can load them inactive because I'm instantiating them.
And I think that Reposition does work only on visible objects :(
-
If they're being drawn in the wrong place, then you can try calling a Refresh on the panel, and/or broadcasting "CreatePanel" to your newly instantiated (and parented!) prefabs. You are using NGUITools.AddChild, right?
-
Yes I'm using AddChild, don't worry :)
I've tried Refresh but nothing changed, and what's the CreatePanel broadcast you're talking about ? What's used for ?
-
gameObject.Broadcast("CreatePanel");
Ensures that all widgets have registered themselves with their proper panels.