V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
loverorser
V2EX  ›  程序员

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

  •  
  •   loverorser · 2020-07-13 22:16:16 +08:00 · 494 次点击
    这是一个创建于 1354 天前的主题,其中的信息可能已经有所发展或是发生改变。
    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 吗?
    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1065 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 19:02 · PVG 03:02 · LAX 12:02 · JFK 15:02
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.