how to pause a animator unity code example
Example: unity pause animator
float prevSpeed;
// Pause
var animator = GetComponent<Animator>();
prevSpeed = animator.speed;
animator.speed = 0;
// Continue
animator.speed = prevSpeed;
float prevSpeed;
// Pause
var animator = GetComponent<Animator>();
prevSpeed = animator.speed;
animator.speed = 0;
// Continue
animator.speed = prevSpeed;