Author Topic: UIPlay Animation - More than One 'OnFinished' items  (Read 3592 times)

jaz1974

  • Guest
UIPlay Animation - More than One 'OnFinished' items
« on: November 05, 2013, 06:32:15 AM »
Hi,

Im experiencing a problem with the OnFinished notifiers in the UIPlay Animation script.

If I add one it works fine.
If I add more than one, none of them work.

Its giving me a real headache :)

Any ideas?   Am I missing something perhaps?

Thanks in advance,

Jaz

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UIPlay Animation - More than One 'OnFinished' items
« Reply #1 on: November 05, 2013, 07:10:34 AM »
One what? Callback or animation? How are you adding them?

jaz1974

  • Guest
Re: UIPlay Animation - More than One 'OnFinished' items
« Reply #2 on: November 05, 2013, 08:09:31 AM »
Hi Aren, I've attached a screen shot.
Im simply dragging the gameobject into the Notify field (in the On Finished panel) and then selecting the component from the pulldown.
As you can see in the attached image, I'm using it to trigger a tween on a separate sprite.
This works fine.
However, if I add another one, it fails to trigger either of them.

Cheers!

Jaz

Macronaut

  • Guest
Re: UIPlay Animation - More than One 'OnFinished' items
« Reply #3 on: November 05, 2013, 09:23:52 AM »
A little tip my friend,

Try creating a script (and attaching it) for your gameObject so that at the start of it (using C# it would be VOID START) you can use EventDelegate.add (are you aware of that?).

Example =

UIPlayAnimation AnimControl = gameObject.getComponent<UIPlayAnimation>();
EventDelegate.add (or set if it's only one, not your case XD) (AnimControl.onChange, doSomeCode);

void doSomeCode(){

//TYPE YOUR CODE IN HERE

}

I believe that practice-wise this is much better than using Unity's IDE for a task that isn't overly complicated. If you need more help you can mail me and I can send you a more pratical approach of an answer (such as a prototype project).

Hope it helps you! ;)

email = marcosviniciusdreher@hotmail.com

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UIPlay Animation - More than One 'OnFinished' items
« Reply #4 on: November 05, 2013, 12:49:54 PM »
You're right, there is some issue. I will investigate and fix it for the next update.