Hi,
When I select my animation in the Project window, there is no ‘loop time’ check box option in the inspector (the only option is wrap mode). This is the script I am using to play my animation upon button press, but at the moment, when I play the animation, it does not stop after 1 play and continues to loop forever.
This is the script I am using:
var animation_bool : boolean ;
function Update()
{
if(animation_bool == true)
{
GetComponent.<Animation>().Play("Attack1");
}
if(Input.GetButtonDown("Fire1"))
{
animation_bool = true;
}
}
Here is a screenshot showing the Inspector window of my animation:
How do I get the ‘loop time’ option to show, or, how do I change my script/animation so that it only plays once upon button press?
Thanks - Ethan