ClientSim
ClientSim copied to clipboard
Missing UdonSharpBehaviour References in Play-Mode Tests
I've created a PlayMode test for my scene which derives from ClientSimWorldTestBase. The test setup is identical to "ClientSimWorldTestExampleScene" as provided in the Samples. When running the test, all references to gameObjects in my UdonSharp Behaviours are cleared out (set to none). The test will also not finish and runs indefinitely.
This part of the Instructions for Automated Testing seems relevant:
Due to the nature of how ClientSim starts using the InitializeOnLoad, testing requires modifying Unity editor settings to properly validate behaviour. In the test environment, InitializeOnLoad happens before playmode starts. The default Unity setting has Domain Reloading enabled on entering playmode. This means that on switching to playmode, all variable data is cleared. In order to get around this, all ClientSim tests must run with Domain Reloading disabled. This is handled automatically for any test written that derives from either of the two test fixture base classes: ClientSimTestBase and ClientSimWorldTestBase.
But since my test Class derives from ClientSimWorldTestBase, this shouldn't be the problem.
Are you saying a folder called "Tests" is missing? How do we re-enable this? My references suddenly disappeared as well only for select Scripts. Strange. Any guidance would be highly appreciated!