unity pause animator

58

unity pause animator -

float prevSpeed;

// Pause
var animator = GetComponent<Animator>();
prevSpeed = animator.speed;
animator.speed = 0;

// Continue
animator.speed = prevSpeed;

Comments

Submit
0 Comments