How to start an Animation from the beginning?

I have this code, and it doesn’t work as I want:

    public void React () {
        animator.Play("test animation");
    }

I want the animator/mechanim to start the “test animation” from the beginning immediately after the method is run. Right now with that code I have to wait until the animation has ended before I can play it from the beginning again.

How can I achieve this?

Found a solution.
Changed the line to this:

animator.Play("test animation", 0, 0);
1 Like