Wait until animation ends?

Hi
I want to make script that:

  1. Change float “speed” to 0.000001
    2.Wait until animation “x” is finished
  2. Change float “speed” to 5

I’ve just search whole internet to find point 2, but every solution seems don’t working. Thanks for help

Are you using Mecanim? If so you can use a state machine behaviour to get a callback when the animation state is exited. Otherwise you could use an animation event on the animation clip to call a method at the end.

Sam

Thanks a lot, I’ve did this with animation events