Animator’s Play method will only play a state once. Is there a way to switch state on animator or loop a state?
bump
Make sure your animation clip is set to Loop. (Inspect the clip and tick Loop Time.)
Animator.Play() switches the animator to a state. If you don’t transition out of that state, it will stay in the state. If the state has an associated animation clip, it will play that clip using whatever loop mode you’ve set.
Yes, it’s set to Loop Time. When I tried to use “Play” it just played it once. I’ll try again just to make sure.
It is perhaps transitioning out of the state?
This was the case for me. It hit the requirements for a transition, and it transitioned to the next animation state.
If the animation in the state is set to “loop,” and the animation state has no transitions or the transition’s parameters are not matched, the animation will loop.