i need the animation to be set as a variable. This is what i have and i get the error: Assets/animationcontroller.js(11,13): BCE0020: An instance of type ‘UnityEngine.Animation’ is required to access non static member ‘Play’.
This is what i have:
#pragma strict
public var run : AnimationClip;
function Start () {
}
function Update () {
if(Input.GetButtonDown("space")){
Animation.Play(run.name);
}
}