Creating a mod
Mods are created in Unity. You can create scenes, prefabs and scripts just like you would in any other Unity project.
Once you have finished creating the assets and scripts, you can export the project as a Mod. After that, they can be used in the game.
To begin creating a Mod, create a new Unity project. It is recommended to have a separate project for each Mod.
The Mod tools for the game are included as a .unitypackage file. You can import the package into Unity and start creating Mods.
To export the project as a mod, go to the game's menu and select Export Mod.
Here you can give the Mod a name and other information. You can select which platforms the Mod will support and whether to include scenes and prefabs.
ModTool relies heavily on AssetBundles, which means mods can only be created with the same version of Unity that was used for building the game. The exporter will check if the correct version is used and inform you if that's not the case.
The game might have some restrictions imposed on what you can do with scripting. This is to make sure it will be compatible with the game and to prevent the Mod from breaking things as much as possible.
The mod will be validated before it's exported. You can also choose to validate it at any time to see if your mod is compatible with the game. Any errors during validation will be logged to the console or the game's log file.
By default, ModTool will force the use of ModTool.InterfaceModBehaviour instead of MonoBehaviour. ModBehaviour is a MonoBehaviour, but with some added functionality that enables ModTool to keep track of what a Mod instantiates.
When a Mod's scripts derive from ModBehaviour, any remaining GameObjects can be cleaned up when the Mod is unloaded.