Wait for Queued Animation to finish
Hey Everyone,
What is the best way to approach waiting for queued animations to finish and then following it up with a statement. In other words, i'm trying to wait for all the animations to play and then perform a statement.
anim.Play("wave");
anim.PlayQueued("clap", QueueMode.CompleteOthers);
anim.PlayQueued("jump", QueueMode.CompleteOthers);
Debug.Log("all animation has finished!");
Any help will be appreciated!
Cheers,
Answer by hexagonius · Sep 25, 2015 at 10:22 AM
If this order stays the same you could put an event on the last frame of the jump animation.
I'f it's different you could yield for the time all animations take in total until calling your debug.
Your answer
![](https://koobas.hobune.stream/wayback/20220612035004im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Tower defense: Tower play animation when enemy appear 2 Answers
How to let animation play to the end before playing the next one using button 2 Answers
animation plays when game starts. game story intro. i need help 0 Answers
Play animation when shooting? 0 Answers
Play animation on collision 1 Answer