Answers for "unity how to check if animator is playing this state"

C#
0

unity detect if animation is playing

if(this.GetComponent<Animator>().GetCurrentAnimatorStateInfo(0).normalizedTime >= 1)
{
	//Do something when animator isn't playing
{
Posted by: Guest on March-08-2021
0

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 how to check if animator is playing this state"

C# Answers by Framework

Browse Popular Code Answers by Language