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 = animTime});
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!
If I set that particular animation to the default animation of the animator, each time I use AddEvent it also restarts the animation?
Your answer
Follow this Question
Related Questions
Scope Animation doesn't work?! 0 Answers
Having problems with manually animating the Animator, some frames happen twice 0 Answers
How do get access to animation clips in selected model from EditorWindow? 0 Answers
how to Restore corrupted Animator 0 Answers
Trouble clicking event in animation timeline,Can't select animation event in timeline editor 2 Answers