Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: duncanx on June 26, 2013, 03:13:10 AM
-
When you use clipping on a panel, everything attached to that panel gets clipped...but you'll usually want to have a background of some sort...probably a tiledsprite. For example if we are making a floating window that has some scrollable elements in it. My question, for that background (or stuff that we don't want to get clipped) is it best to use another UIPanel or just attach the tiledsprite to an empty gameobject?
In the unity hierarchy we get something like...
Option A
- UIPanel that is just holding a tiledsprite
- UIPanel that is doing some fancy clipping on whatever other elements
Option B
- Empty Gameobject that has a tiledsprite child
- UIPanel that is doing some fancy clipping on whatever other elements
Which case should I use?
-
Everything needs to be under a UIPanel so make one for the background (sans clipping)
-
If there's no UIPanel anywhere above a widget in the hierarchy, NGUI adds one by itself. It is smarter that you control it yourself and add one.
-
Ah - that makes sense. Thanks!