Hi, I have been programming for a while but am very new to Unity and Spine.
I set my object's animation state like:
if (AnimationString.Equals("Dead"))
{
enemySkeleton.AnimationState.SetAnimation(0, AnimationString, false);
}
And I can't stop it from keep looping this animation.
1) I tried the SetAnimation() with the loop argument = false
2) I tried AnimationState.ClearTrack()
3) only way to stop was manually waiting some time using a timer and doing
enemySkeleton.AnimationState.TimeScale = 0;
which I want to avoid
4) I tried
enemySkeleton.AnimationState.AddAnimation(0, (Spine.Animation)null, false, 0);
And it forces the object to stop after death animation but I want to avoid this and if I catch the ArgumentNullException the animation starts looping again.
I did the pretty same thing for my character object and it stops on death so I am very confused. Any help??