Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

unity animator check if animation is playing

bool isPlaying(Animator anim, string stateName)
{
    if (anim.GetCurrentAnimatorStateInfo(animLayer).IsName(stateName) &&
            anim.GetCurrentAnimatorStateInfo(animLayer).normalizedTime < 1.0f)
        return true;
    else
        return false;
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #unity #animator #check #animation #playing
ADD COMMENT
Topic
Name
2+6 =