• 请不要在回答技术问题时复制粘贴 AI 生成的内容
loverorser
V2EX  ›  程序员

有开发 Unity3d 的朋友吗,遇到个神奇 bug 求解决。

  •  
  •   loverorser · Jul 13, 2020 · 926 views
    This topic created in 2242 days ago, the information mentioned may be changed or developed.
    animator.Play("slash1");
    Debug.LogError(animator.GetCurrentAnimatorStateInfo(0).IsName("slash1"));
    yield return new WaitForEndOfFrame();
    Debug.LogError(animator.GetCurrentAnimatorStateInfo(0).IsName("slash1"));

    返回 false 和 true
    照理说,我都 play 了,那不应该马上变吗,还要等一帧才能获取到 是 bug 吗?
    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   994 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 22ms · UTC 19:15 · PVG 03:15 · LAX 12:15 · JFK 15:15
    ♥ Do have faith in what you're doing.