isPlaying()

public bool isPlaying(Animator anim, string stateName)
    {
        if (anim.GetCurrentAnimatorStateInfo(0).IsName(stateName) && anim.GetCurrentAnimatorStateInfo(0).normalizedTime < 1.0f)
        {
            //Debug.Log(stateName);
            return true;
        }
        else
        {
            return false;
        }
    }


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *