unity3d animator pause 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;