unity how to wait for end of animation before executing method code example
Example: unity wait for animation to finish
//if animation with name "Attack" finished
if (anim.GetCurrentAnimatorStateInfo(0).IsName("Attack"))
{
//do something
}
//if animation with name "Attack" finished
if (anim.GetCurrentAnimatorStateInfo(0).IsName("Attack"))
{
//do something
}