- Home /
how can i make animation name of animator to string ??
how can i make the animation of animation is playing to string ??, i want to make the animation now playing to string, i was trying for many time, and trying find solution but still not found any solution, can someone help me please,,
using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.Animations; public class AnimationName : MonoBehaviour { public string animationName; Animator anim; AnimatorStateInfo animStateInfo; void Start () { anim = GetComponent<Animator>(); } void Update () { animationName = animStateInfo.IsName("animation name is playing"); } }
Your answer
Follow this Question
Related Questions
Get Animation from Animator 2 Answers
How check if an animation trigger is playing? 1 Answer
Animation keeps playing even with "loop" deactivated. 1 Answer
2D Animation does not start 1 Answer
Accessing AnimationState in Animator 0 Answers