3

Have a look at different approach on Animation using "SimpleAnimation" via new Unity's Playable system. Introducing the Simple Animation Component (Unity Blog) Under the hood it hacks the way using animator to play animation while controlling clip and state name from Playables, using new API set UnityEngine.Playables.AnimationPlayableUtilities But now ...


1

Without using the Animation Controller, you can use Animation Type to Legacy. Then All you need to attach the script to animation object. public Animation animates; void Start() { animates = GetComponenet<Animation>(); } public void Plays() { animates["ClipName"].normalizedTime = 0.0f; animates["ClipName"]...


1

[SerializeField] Animator animator; int NumberOfNonEmptyStates = animator.runtimeAnimatorController.animationClips.Length; This returns the number of non-empty states in the specified animator. (I'm using Unity version 2018.3.4)


Only top voted, non community-wiki answers of a minimum length are eligible