Add Udon Test Kit to your project
Install the kit in a VRChat world project, then create the test assemblies your tests go in.
Requirements
- Unity 2022.3.
- The VRChat Worlds SDK 3.8.2 or later, which includes UdonSharp and ClientSim.
- Unity Test Framework, which new Unity projects already include.
Install the package
Install Udon Test Kit (com.tsvrc.udon-test-kit) as described in
Install a TsVRC package. Its .unitypackage is on the
releases page.
You'll know it worked when the Unity menu bar has Tools > TsVRC > Udon Test Kit.
Create your test assemblies
Unity Test Framework finds tests in test assemblies, and the kit creates the three a world needs.
- In the Project window, select the folder your tests should live in, such as
Assets. - Choose Assets > Create > TsVRC > Udon Test Kit > Test Assemblies.
You get a Tests folder with three assemblies, each with an example that works:
EditModeandPlayModehold your tests.Doublesholds behaviours your tests add to GameObjects, such as spies with callbacks of your own. Both test assemblies reference it.
They reference the kit, UdonSharp, the VRChat SDK, ClientSim and every assembly definition of yours
under Assets, and like the kit, they're left out of your world's builds.
TestAssemblyCreator describes each one.
If your scripts have no assembly definition, the menu item logs a warning, and Play Mode tests can't reach them yet. See Test scripts that have no assembly definition.
Next
Continue to Write your first test to run the examples and write a test of your own.