- Home /
Set Animator Animation to specific Frame
Hi,
I want to have a specific animation in a specific layer to start at frame 5. My animation is not activly playing because it's speed is set my a speed multiplier which only changes on buttonpress.
What i tried already is:
anim.Play("BigOpen", 1 , (1/30)*5);
But this doesn't work because of the speed i believe.
How can i set the start frame to 5? Thanks in advance
Comment
Okay it seems to work but only when i set a high speed at start.
anim.SetFloat("BigArmSpeed",10f);
anim.Play("BigOpen", 0 , (1/30)*5);
So my layer seemed to be wrong also. But now i get a warning:
Animator.GotoState: State could not be found
UnityEngine.Animator:Play(String, Int32, Single)
ExcavatorScript:Start() (at Assets/Scripts/ExcavatorScript.cs:46)
Shall i just ignore it?