有开发 Unity3d 的朋友吗,遇到个神奇 bug 求解决。
資深大佬 : loverorser 8
animator.Play(“slash1”);
Debug.LogError(animator.GetCurrentAnimatorStateInfo(0).IsName(“slash1”));
yield return new WaitForEndOfFrame();
Debug.LogError(animator.GetCurrentAnimatorStateInfo(0).IsName(“slash1”));
Debug.LogError(animator.GetCurrentAnimatorStateInfo(0).IsName(“slash1”));
yield return new WaitForEndOfFrame();
Debug.LogError(animator.GetCurrentAnimatorStateInfo(0).IsName(“slash1”));
返回 false 和 true
照理说,我都 play 了,那不应该马上变吗,还要等一帧才能获取到 是 bug 吗?
大佬有話說 (0)