Hi mates!
I'm playing with animation speed and I wanna realize a general script that allow me to put the script on an animated object and change animation speed of the default animation. Now I'm playing with " animation["Walk"].speed = -1.0; " but in this case I need to declare which animation engage for the operation. Is there a way to change speed for the default animation?
Tnx!!
4 Answers
4
You could use animation.clip to try get the name of the default one:
animation[animation.clip.name].speed = -1;
Try using the Animation Events Feature of the Animation View & Curve editor.
You could use the curve editor & add animation events that can be called from a script.
object.animation[clipname].speed=2;
also works fine
Sorry to necro a thread. But in case others find this thread like me.
Meat’s answer is good. But it also speeds up all the animatons on that particular layer.
Unity came up with a solution (finally) after a couple years.
link text
sharing is caring
https://twitter.com/IndieNendoroid