- Home /
2d animation how to stop your animation and set a condition
so basically I created a 2d animation from a sprite then afterwards I created a code that will make an animation play for a certain condition for example:
if (answer == 1)
{
ShowIncorrect = false;
ShowCorrect = true;
Char.animation.Play("Wrong answer");
Attack();
NextQuestion();
}
the problem is the animation keeps on playing then i realize the problem, the problem is its not the animation its the animator, because when I disable the animation the character is still playing the animation and when i disable the animator it stops so what do i need to do for me to fix this problem i need the animation of the 2d sprite to play in a certain condition and stop playing repeatedly im a complete newbie so please help me
Comment
Your answer
Follow this Question
Related Questions
2D Animation does not start 1 Answer
Animation in Unity 4.3 0 Answers