I made a simple animation script that when you press a button an animation plays. When I apply it to any object, and play the game, unity crashes!! If I delete the script then everything works fine.
The script goes like this.
if(Input.GetKey(“w”){
animation.Play(“Run”);
}
else{
animation.Stop();
}