A Unity ID allows you to buy and/or subscribe to Unity products and services, shop in the Asset Store and participate
in the Unity community.
Welcome to the Unity Forums! Please take the time to read our Code of Conduct here to familiarize yourself with the rules and how to post constructively.
Discussion in 'Animation' started by Raybrand, Mar 14, 2014.
hi I want a function that returns the name of the animation playing as a string
While Unity is in a transition phase between Legacy and Mecanim animation systems, please specify which system you're using. Also specify 2D or 3D.
Unfortunately, in both systems there's no good way to get this information because multiple animations can play at the same time, using blending, masking, and/or additive animation.
In Mecanim, you can get information about the current state with Animator.GetCurrentAnimatorStateInfo().