I have a character and it has different type of animations.
I am playing particular animation at a particular time.
Now I want to check whether the animation is over or not and I want to perform some action that.
I am doing this in ienumerator. Something like this.
private IEnumerator WaitAndHoldPerformAction()
{
while(animation.IsPlaying("run"))
{
yield return null;
}
Debug.log("Perform action now");
}
Is this a good way to it or is there any other way to do it?