Answers for "unity get currently playing animation"

C#
0

unity get currently playing animation

anim.GetCurrentAnimatorClipInfo(0)[0].clip.name

        //Get them_Animator, which you attach to the GameObject you intend to animate.
        m_Animator = gameObject.GetComponent<Animator>();
        //Fetch the current Animation clip information for the base layer
        m_CurrentClipInfo = this.m_Animator.GetCurrentAnimatorClipInfo(0);
        //Access the current length of the clip
        m_CurrentClipLength = m_CurrentClipInfo[0].clip.length;
        //Access the Animation clip name
        m_ClipName = m_CurrentClipInfo[0].clip.name;
Posted by: Guest on October-08-2020

Code answers related to "unity get currently playing animation"

C# Answers by Framework

Browse Popular Code Answers by Language