how would i go about doing this
var ObjectToAnimate : GameObject;
{
function Start()
ObjectToAnimate.animation.Play(“Be able to change this in inspector”);
}
iv seen this done not with animation but with changing levels to load but this has me totally stumped
have a variable called ‘animaton1’ or something then in ur code put
var animation1 : AnimationClip;
ObjectToAnimate.animation.Play(animation1.name); }
?? isnt it like that
EDIT
Try var animation1 : Animation; instead
Animation.Play requires the name of the animation. So what you do is assign a public animation clip like you have done, but use the name of the animation when playing it.
ObjectToAnimate.animation.Play(animation1.name);