Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: Sahkan on July 07, 2014, 08:20:23 AM

Title: A question about hierarchy.
Post by: Sahkan on July 07, 2014, 08:20:23 AM
I'v been told that making widget a child of widget is bad, Is it true ? If so, why ?

And is it ok to have widgets in my hierarchy while they are not on top of each other ?
I mean :

root
-panel
--widget
---panel
----widget

The thing is, i want to use the Anchor widget ( Not the UIAnchor ) and it seems like i have to have some generic widget ( UIWidget ) on the op of some other widgets to make it work .

Anchor doesn't work well if i use the "UIPanel + AlphaClip" for it, it will make an Anchor but wont take anything with it...
Title: Re: A question about hierarchy.
Post by: Sahkan on July 08, 2014, 01:22:04 AM
Bump ! Very important !
Title: Re: A question about hierarchy.
Post by: Nicki on July 08, 2014, 02:51:43 AM
You can do it, it's fine.

It's bad to put both panel and widget on the same game object, but nesting them is fine now. It used to be really bad, because the localScale was used making the child widgets all messed up, but this is not a problem anymore.
Title: Re: A question about hierarchy.
Post by: Sahkan on July 08, 2014, 04:07:30 AM
Thank you very much ! XD
Btw do you know from what version it is no longer a problem ? We use 3.5.3 in our team project .
Title: Re: A question about hierarchy.
Post by: ArenMook on July 08, 2014, 12:13:33 PM
Since NGUI 3.0.0.
Title: Re: A question about hierarchy.
Post by: Sahkan on July 08, 2014, 10:34:20 PM
Nice, thanks !