using UnityEngine; public static class AnimatorExtension { public static bool IsComplete(this Animator animator, int nameHash) { var stateInfo = animator.GetCurrentAnimatorStateInfo(0); if (!stateInfo.loop && stateInfo.shortNameHash == nameHash && stateInfo.normalizedTime >= 1.0f) return true; return false; } }