gpt4 book ai didi

testing - 为什么 "yield return new WaitForEndOfFrame()"从不在批处理模式下返回?

转载 作者:行者123 更新时间:2023-11-28 19:46:28 25 4
gpt4 key购买 nike

我正在尝试使用统一测试工具包编写集成测试。

测试在编辑器中运行没有问题(在播放模式下)。

但是当我尝试从命令行(以批处理模式)运行集成测试时,WaitForEndOfFrame 协程永远不会返回。

这是一个已知问题还是我遗漏了什么?

我正在使用以下命令来运行测试:

 /Applications/Unity-5.3.1-f1/Unity.app/Contents/MacOS/Unity \
-batchmode \
-nographics \
-logfile \
-projectPath $(pwd) \
-executeMethod UnityTest.Batch.RunIntegrationTests \
-testscenes=TestScene \
-resultsFileDirectory=$(pwd)

最佳答案

在批处理模式下,Unity 不会在编辑器中更新帧。来自他们的 documentation :

  • You cannot use WaitForEndOfFrame when running the Editor with -batchmode, because systems like animation, physics and timeline might not work correctly in the Editor. This is because Unity does not currently update these systems when using WaitForEndOfFrame.

关于testing - 为什么 "yield return new WaitForEndOfFrame()"从不在批处理模式下返回?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35716477/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com