playMaker

Author Topic: Parenting Ngui Sprite[SOLVED]  (Read 3525 times)

Yanifska

  • Full Member
  • ***
  • Posts: 163
    • My Portfolio
Parenting Ngui Sprite[SOLVED]
« on: November 05, 2013, 06:01:51 PM »
Hi,
I am trying to parent a Ngui sprite at runtime but my sprite disapear when I do.
I need to use the Correct button from the widget panel I think, but I cant find which property I need to set to get the same effect.

Any help apreciated
thx
Yaniv
« Last Edit: December 19, 2013, 06:35:38 AM by jeanfabre »
Visit my portfolio: http://www.yanivcahoua.com/

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Parenting Ngui Sprite
« Reply #1 on: November 06, 2013, 12:52:19 AM »
Hi,

 you need to use a specific action for this: NguiAddChild, have you tried with it?

bye,

 Jean

Yanifska

  • Full Member
  • ***
  • Posts: 163
    • My Portfolio
Re: Parenting Ngui Sprite
« Reply #2 on: November 06, 2013, 03:20:16 PM »
Thanks it works.
It seems I can't parent an NGUI Object to a non NGUI, like an empty GameObject.
Do you know any workaround?
« Last Edit: November 06, 2013, 03:53:51 PM by Yanifska »
Visit my portfolio: http://www.yanivcahoua.com/

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Parenting Ngui Sprite
« Reply #3 on: November 07, 2013, 12:22:56 AM »
Hi,

 Ngui widgets must be within a nGui UIRoot, you can't use ngui outside a hierarchy not set up for nGUI, within it you can have empty objects, that's ok.

bye,

 Jean