- Home /
Question by
KitingMechanics · Oct 13, 2020 at 08:50 PM ·
animationruntimelooplooping
How to set Animation to Looping via script?
Yo im trying to loop an animation only if certain condition are set. But this just changes the state of animation, it doesn't play the animation back.
public Animator anim;
private void PlayAgain()
{
anim.Play("myAnim");
}
I also tried switching to idle briefly and setting it back to my animation (shooting) but it doesn't work since its on the same frame it just stays on the shooting state and stays on the last frame.
How do I set an animation to loop at runtime? OR How do I play an animation back while being in the same animation state?
Thanks
Comment
Your answer
Follow this Question
Related Questions
Programmatically created AnimationClip will not loop 2 Answers
Looping animation while key down 1 Answer
How To Wrap A Blender Animation??? 1 Answer
I can't put animations on loop. 1 Answer