Hello! I was doing well with animations until I stuck with this problem. I need to modify my animation speed to make my animation dynamic. I guess that the best way to do this would be to get my animation speed via Animator component, because I am using animator controller, but I can’t find the right command to do this. Also, I can’t find information about this, so please, help me if you know the answer. Thanks!
You can change the speed of the Animator component, but beware that will affect all of the animations attached to that component.
public Animator animator;
public float desiredSpeed;
animator.speed = desiredSpeed;
adjust the desiredSpeed value from the inspector. Last time I checked, there was no way to reach and change the clip speed, but that may be fixed with a latest update, I haven’t checked the changelogs yet.
You can only change it per Layer.
Here’s an answer I knocked up previously, which includes a method of pseudo-Changing each clip speed.
http://answers.unity3d.com/questions/731173/problem-adding-animation-speed.html