gpt4 book ai didi

unity3d - 统一 : Access classes in Assembly-CSharp from playmode tests

转载 作者:行者123 更新时间:2023-12-04 15:55:06 25 4
gpt4 key购买 nike

是否可以在播放模式测试中引用 Assembly-CSharp?我想在我的测试中测试/使用脚本,但不知道如何引用 Assembly-CSharp。
谢谢!

最佳答案

用户 'MafiaMoe' 在 Unity 论坛中回答了这个问题:

The 'solution' is to right-click on the Test Runner tab and click'Enable playmode tests for all assemblies'. Then (after a restart ofUnity) playmode tests can be written directly in the game scripts. Ithink this video has a good example: youtube

However, after working play mode tests into our game developmentroutine, I think I have a better idea how this is all supposed to work. > What we have been doing is keeping the 'Enable playmode tests for allassemblies' OFF and setting up test scenes that are already pre-configured to 'run-on-load'. With that, all the playmode test scriptsneed to do is load the scene and assert that certain log messages showup.

This seems to keep the process of creating and maintaining tests lessconvoluted, as almost all of the configuration happens within theeditor. This also means no playmode tests are awkwardly included in the > game scripts, when this type of test seems best suited to validateinteractions between multiple scripts within a game scene.

关于unity3d - 统一 : Access classes in Assembly-CSharp from playmode tests,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52059697/

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