Changing animation state?

I have two animations in the animator and i want to switch between them instantly with c# script. I mean changing current animation (without transition time). How can I do that. Thanks in advance.

Hey there, have you had a chance to check out our official documentation on animation?

Hope it helps!

Select the transition in animator window and uncheck the Has Exit Time checkbox and set duration to 0 in inspector(not sure if setting duration to 0 is mandatory)