So I made some animations for an arm that I imported (Animation was done in unity) and I put all the animations to the arm, but when It needs to play the animation, let’s say the Idle animation, I get this error : The animation state Idle could not be played because it could not be found! Please attach an animation clip with the name ‘Idle’ or call this function only for existing animations.
The animation clip Idle is attached to the arm, and the script I’m sure is right, but here it is just in case:
if (Input.GetButton("Fire1"))
{
animation.Play("Punch");
}
if (Input.GetKey(KeyCode.W) Input.GetKey(KeyCode.LeftShift))
{
animation.Play("Sprint");
}
if (Input.GetKey(KeyCode.W))
{
animation.Play("Run");
}
else
{
animation.Play("Idle");
}
Does anyone know what could have possibly cause this error?
Thank You