Pause mecanim animation

Is there a way to pause current mecanim animation clip, like we did with Animation.Stop() for the legacy animation system?

Have you tried Animator.speed = 0?

animator.enabled = false;

If anyone still wondering, I think the best way to pause a specific animation state is to create a float parameter in the animator controller called something like “animSpeed” and assign it to the speed multiplier parameter of the animation state, then you can call animator.SetFloat (“animSpeed”, 0f) to pause the animation and animator.SetFloat (“animSpeed”, 1f) to resume it.
Hope it helps someone. :slight_smile:

//You may simply keep the animator playing from the same key time

float freezeTime;

bool freeze = false;//when freeze gets true,freeze animation !

public bool Freeze{


&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspfreeze = value;

&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp if(freeze){

&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspfreezeTime = animator.GetCurrentAnimatorStateInfo(0).normalizedTime;





&nbsp&nbsp&nbsp&nbsp if(freeze){

&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspAnimatorStateInfo stateInfo = animator.GetCurrentAnimatorStateInfo(0);

&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspanimator.Play (stateInfo.nameHash, 0, freezeTime);