how to pause animation 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;