Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: poolts on May 13, 2014, 11:07:42 AM
-
I've heard a few schools of thought on this:
- Use an empty game object
- Use an invisible widgit
- Use a panel (which I believe is bad, as geometry will get needlessly redrawn, and should only be used if something(s) changes frequently)
I'm currently doing option 1 and just wanted to make sure that's the correct way to go.
P.S. I know this is a pretty simple question, but I searched the forums and found a few different answers, so wasn't really sure which is best.
-
Depends on what you're doing.
Generally you will want to have a panel container for each new window you create as moving panels is very efficient, while moving widgets is not. For regular grouping, an empty game object is perfectly fine. However if you want to be able to move the object in the scene view like a widget, then you will need to place a UIWidgetContainer on it. Using a widget is great if you are making good use of the layout system (anchoring), or if you want to control the alpha of a group of widgets (as widget alpha is cumulative).