[Unity] [Animator] SetTrigger work not fine?
If you want to SetTrigger an animator state "A" with trigger parameter "a", you should wait until the current state is not "A". If you do not, sometimes your trigger will be off at the time the state "A" finishes.
For example: IEnumerator Test() { int A = Animator.StringToHash("A"); while (animator.GetCurrentAnimatorStateInfo(0).nameHash == A) { yield return new WaitForEndOfFrame(); } animator.SetTrigger("a"); }










