Unity modding tools
- 1 Overview
- 2 Programming/Decompilation
- 3 Asset Extraction
- 4 Asset Modification/Reimporting
This article exists as a collection of various tools and programs that can be used for modifying various parts of games made with the Unity engine. Specifically, it is intended for modding the game Lobotomy Corporation, but can apply to any Unity game.
Unity uses the programming language C#, which thus makes the source code of the game extremely easy to compile and modify. The following tools can be used for doing so.
C# Library: Harmony (Github Link)
Library for patching, replacing, and altering applications at runtime in C#. It has been used for modifying games such as Rimworld, 7 Days To Die, Stardew Valley, and is also a part of Lobotomy Corporation's BaseMod.
dnSpy (GitHub Link)
A debugger and .NET assembly editor.
Very useful with many useful functions such as: searching through the code for a string; analyzing functions, objects, and variables to see where they're called and modified; IL-code editing; and of course a dark mode.
Part of dnSpy is also built on code from the following tool.
ILSpy (GitHub Link)
.NET assembly browser and decompiler.
Essentially what dnSpy does but with fewer additional-utilities.
dotPeek (Webpage Link)
.NET assembly decompiler and viewer.
Useful tool for viewing IL code side-by-side with C# code. It can also be used for editing assemblies.
JustAssembly (Webpage Link)
A tool that can compare two .NET assemblies and find the differences between them.
The tools in this section can only be used for Asset Extraction and nothing else, if you are seeking to reimport assets after modification, go to the next section below.
AssetStudio (Github Link)
A tool that allows the extraction of various files. At times it can run a bit weird, but nothing too alarming. This can be considered the best tool for asset extraction.
As of writing, it can extract the following files:
- Texture2D converted to .bmp/.png/.jpeg
- Sprites converted to .bmp/.png/jpeg
- AudioClips converted to .mp3/.ogg/.wav/.m4a/.fsb
- Animators exported to FBX file
Unity Assets Bundle Extractor (UABE; Forum Link)
Standard fair pretty much. Has plugins that can convert image files to the corresponding texture files used in the game. It also has a very useful tool to create installers that will automatically modify the corresponding asset files to update the game. An example of the installer is used in the Agent Ears mod for Lobotomy Corporation.
UnityEX (Russian Forum Link)
Although this tool doesn't have a tutorial or any documentation for how to use it, it is very easy to figure out.
uTinyRipper (Github Link)
This tool is also fairly simple to use. It also has a feature the other tools do not, which allows for Scenes to be extracted from the files. This allows the game's assets to be reimported and used in the Unity engine to create a new project file.