Running the game in Unity
It is possible to run the game directly in the Unity editor. This allows you to inspect the running game's scene, inspect and debug UI, validate colliders, run performance analysis, and more. Note that the game uses instancing heavily and most meshes in the game are not GameObjects, thus are not selectable.
This is how to make it work for you:
- Complete the Unity setup guide.
- Select the
Gameobject in the Hierarchy tab. - In the Inspector tab, you should see 3 entries with missing script references, replace them as follows (if not, just add new ones):
- First:
GameMainMb - Second:
GameDebugConfigStatelessMb - Third:
GameDebugConfig
- First:
- In the
GameMainMb, set theWorking Dir Path Overrideto%COI_ROOT%, and theCore Asset Bundle Pathto%COI_ROOT%\AssetBundles(COI_ROOTis set up in Getting started). - In the
GameDebugConfigStatelessMboptions, checkSkip splash screen. - Switch to the Game view and make sure that under Aspect ratio settings (top bar), the
Low Resolution Aspect Ratiosis unchecked and the Scale is set to 1x. - Press the Play button to start the game. Press play again to terminate it.
Notes
- Make sure your mod is reloadable during runtime by setting
"non_locking_dll_load": truein the manifest. - Make sure that Unity project is configured to
Reload DomaininWhen entering play mode(Edit > Project Settings > Editor). - Most options from
GameDebugConfigStatelessMbwon't work properly, sorry!