- Home /
Question by
AryShirazi · Feb 14, 2016 at 09:16 PM ·
animationeventadd
Animation stops playing as soon as AnimationClip.AddEvent is used.
Hi there, I am adding an event to a looping animation on runtime via the following code.
animclip.AddEvent (new AnimationEvent () {functionName = "TheFunction", time = playbackTime});
the problem is that it's stopping the animation, setting all mechanim booleans to false & transitioning back to idle.
I've set the animation in question to loop and be non interruptible.
Why would this line of code force a transition out the animation it adds an event to?
Thanks in advance for any help anyone can shine on this!
Comment