I have a childobject (“EnemyChopper1”) that has an animation com. attached to it.
I want the parent object of “EnemyChopper1” to access the animation and play it.
Here is my script ttached to the parent o.
var enemyChopperMain:GameObject;
var anim:Animation;
Function Start()
{
enemyChopperMain=this.gameObject.Find("EnemyChopper1");
...
}
function Update()
{
anim=enemyChopperMain.GetComponent(Animation);
anim.Play("Test");
}
But all i get is :
"MissingComponentException: There is no ‘Animation’ attached to the “EnemyChopper1” game object, but a script is trying to access it. … "
Please help!