Author Topic: using EnableThenPlay  (Read 3149 times)

Drexster

  • Guest
using EnableThenPlay
« on: May 14, 2012, 03:46:46 PM »
When trying to use If Disabled on Play's: EnableThenPlay, onlythe target object is enabling and not it's children. Is this the desired result?

My target object has multiple animations for it's children object, and obviously I'd like all the object to appear when enabling the target so that I can see the animations.


ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: using EnableThenPlay
« Reply #1 on: May 14, 2012, 05:11:26 PM »
I don't see why that would be the case.

Line 167 of ActiveAnimation: NGUITools.SetActive(anim.gameObject, true);

SetActive is recursive.

Drexster

  • Guest
Re: using EnableThenPlay
« Reply #2 on: May 14, 2012, 06:32:16 PM »
is there anything that would cause objects to not activate recursively?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: using EnableThenPlay
« Reply #3 on: May 14, 2012, 07:14:12 PM »
Nothing. As long as they're in the hierarchy, they will be activated.

Drexster

  • Guest
Re: using EnableThenPlay
« Reply #4 on: May 14, 2012, 08:26:39 PM »
looks like i was overriding it in script by using gameObject.active, instead of SetActiveRecursively(true)... my bad.
« Last Edit: May 14, 2012, 08:34:29 PM by Drexster »