Author Topic: NGUI unparents my elements  (Read 4930 times)

laurentl

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 188
    • View Profile
    • McDROID
NGUI unparents my elements
« 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 ?

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: NGUI unparents my elements
« Reply #1 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

laurentl

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 188
    • View Profile
    • McDROID
Re: NGUI unparents my elements
« Reply #2 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 (?).

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: NGUI unparents my elements
« Reply #3 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.

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: NGUI unparents my elements
« Reply #4 on: April 05, 2013, 12:46:44 PM »
I keep wording words. Common parent. yes.

turkeypotpie

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 10
    • View Profile
Re: NGUI unparents my elements
« Reply #5 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!

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: NGUI unparents my elements
« Reply #6 on: April 06, 2013, 02:00:48 PM »