Unity - Animation State Reset with Animator.Play
;
Writing and executing the code above will restart the state from the beginning, even if the state is currently mid-animation.
This kind of code is extremely useful for clicker games.
*For those who might find this confusing: in Unity Mecanim (Animator), each state can contain one or more animations, and you can combine animations to implement a single action.
Of course, if you put only one animation in a state, that single animation plays to completion.
Therefore, controlling states is effectively the same as controlling animations.