Every time I try to click text to activate an animation it says that:
An Instance of type ‘UnityEnigine.Animation’ is required to access non static member ‘Play.’
This is my code:
var LevelSelect = false;
function OnMouseEnter()
{
//Change the text color of the test
renderer.material.color = Color.red;
}
function OnMouseExit()
{
//Change the text color of the test
renderer.material.color = Color.white;
}
function OnMouseDown () {
Animation.Play (“LevelSelect”);
}
What am I doing wrong?