Answers for "unity animator check if animation is playing"

C#
1

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;
}
Posted by: Guest on September-23-2020

Code answers related to "unity animator check if animation is playing"

C# Answers by Framework

Browse Popular Code Answers by Language