I imported a blender file (a basic running animation)into Unity as a .FBX file.
I’ve used some code which i thought might play the animation when a key is pressed, but im just getting an error message: “unknown identifier: ‘blockgoatrun’” ('blockgoatrun’being the name of the blender model import).
Here is the code:
var Speed = 5.0;
function Update () {
if(Input.GetKey(“d”))
{transform.Translate(transform.forward * Speed * Time.deltaTime); animation.Play(blockgoatrun);
}
}
Why isn’t it recognising the file?
I know im making some fundamental error as i am still new to all this, im just buggered if i know what it is!
Thank you, Tom.