Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: laurentl on April 05, 2013, 02:06:34 AM

Title: NGUI unparents my elements
Post by: laurentl on April 05, 2013, 02:06:34 AM
when I parent a sprite under another sprite, when I press play the child gets unparented.
Adding a panel to the parent doesn't work
How do I keep the parenting ?
Title: Re: NGUI unparents my elements
Post by: Nicki on April 05, 2013, 04:31:51 AM
Widgets should never be parents of other widgets. Your scale will fuck up and your mind will explode.

Make a comment parent instead

-ParentObject: scale 1,1,1
--widget1: scale: pixelX, pixely, 1
--widget2: scale: pixelX, pixely, 1
Title: Re: NGUI unparents my elements
Post by: laurentl on April 05, 2013, 04:39:16 AM
Ok, I nuked all the UI stuff from the parent and it works which may be similar to your comment parent (?).
Title: Re: NGUI unparents my elements
Post by: ArenMook on April 05, 2013, 11:54:37 AM
Nicki's "comment" was supposed to mean "common". Common parent.

NGUI spits out a warning when it re-parents objects. If you double-click this warning, it takes you to a pretty detailed explanation, with an ASCII drawing to boot.
Title: Re: NGUI unparents my elements
Post by: Nicki on April 05, 2013, 12:46:44 PM
I keep wording words. Common parent. yes.
Title: Re: NGUI unparents my elements
Post by: turkeypotpie on April 06, 2013, 12:27:24 AM
Widgets should never be parents of other widgets. Your scale will fuck up and your mind will explode.

Make a comment parent instead

-ParentObject: scale 1,1,1
--widget1: scale: pixelX, pixely, 1
--widget2: scale: pixelX, pixely, 1

My mind just fucking exploded!

Pop!
Title: Re: NGUI unparents my elements
Post by: Nicki on April 06, 2013, 02:00:48 PM
8)

My mind just fucking exploded!

Pop!