Author Topic: A question about hierarchy.  (Read 2107 times)

Sahkan

  • Jr. Member
  • **
  • Thank You
  • -Given: 9
  • -Receive: 0
  • Posts: 74
    • View Profile
A question about hierarchy.
« 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...

Sahkan

  • Jr. Member
  • **
  • Thank You
  • -Given: 9
  • -Receive: 0
  • Posts: 74
    • View Profile
Re: A question about hierarchy.
« Reply #1 on: July 08, 2014, 01:22:04 AM »
Bump ! Very important !

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: A question about hierarchy.
« Reply #2 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.

Sahkan

  • Jr. Member
  • **
  • Thank You
  • -Given: 9
  • -Receive: 0
  • Posts: 74
    • View Profile
Re: A question about hierarchy.
« Reply #3 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 .

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: A question about hierarchy.
« Reply #4 on: July 08, 2014, 12:13:33 PM »
Since NGUI 3.0.0.

Sahkan

  • Jr. Member
  • **
  • Thank You
  • -Given: 9
  • -Receive: 0
  • Posts: 74
    • View Profile
Re: A question about hierarchy.
« Reply #5 on: July 08, 2014, 10:34:20 PM »
Nice, thanks !