- Home /
Wait for animation end - Sprite Manager 2
Hi,
is it possible to stop the excecution of a script as long as an animation is playing?
something like this:
if (XXX)
{
mySprite.PlayAnim(0);
//function wich stops the script, as long as the animation plays
//function after animation is done
}
Thanks
Comment
Answer by ZeeshanAkhtar_UOG · Sep 06, 2014 at 10:29 PM
make empty object , attact script with it create required script Instance like private ScriptName object; then get components of required that you want to disables ... in start function object.GetComponent(); then write after animation complete object.enabled = false ;
hope you understand , advance sory if any mistake bcz its my first atempt to answer ...
Your answer
![](https://koobas.hobune.stream/wayback/20220613112344im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Stop player movement and play attack animation 0 Answers
Castlevania style stop and attack script. 0 Answers
Reset vector 2 offsets 0 Answers
Animated Overlay Armor Sprite 1 Answer
How do I animate a 2D sprite? 1 Answer