- Home /
Animation keeps playing even with "loop" deactivated.
I made an animation with the animator in unity itself. I want it to "slap" when I click with the left mouse button . Problem is , the animation doesnt stop playing, even with loop deactivated . Screen : http://imgur.com/BDjnwid
This is the code of the slappy script :
function Start () {
if(Input.GetMouseButton(0)) { animation.Play("slap"); }
}
Thanks .
Set it to not loop in the $$anonymous$$odel's Animation Import. In the state machine place something dormant as a Default state for the animation to return to once finished.
Set Culling $$anonymous$$ode to "Based on Renderer"
Thank you meat5000, you saved my life! THAN$$anonymous$$ YOU SO $$anonymous$$UCH!
Answer by cristian780 · Jul 06, 2014 at 03:48 PM
as you see in the image, press the animation and untick the "loop time" option
Your answer
Follow this Question
Related Questions
How to make a 2d animation repeat 1 Answer
Stop animation in Animation Controller 0 Answers
Can't play animation after setting GameObject to inactive and back to active again 5 Answers
Animation Loop 2 Answers
How can I reset a non-looping animation? 0 Answers