Skip to main content
Before you install the template or create a plugin project, make sure you have the following in place.

ChroMapper

You need a working ChroMapper installation on your machine. ChroMapper is available at github.com/Caeden117/ChroMapper. The project file references DLLs directly from your ChroMapper installation directory — specifically from the ChroMapper_Data\Managed\ subdirectory inside it. If ChroMapper is not installed, the project will not compile.

.NET SDK

The dotnet new command requires the .NET SDK. Any version that supports .NET Framework 4.8 class library projects and the dotnet new template system will work. You can verify your installation by running:
dotnet --version
If the command is not found, download the SDK from dot.net.

The ChroMapperDir environment variable

This is the most important configuration step. The project file and the post-build deploy step both read ChroMapperDir at build time. If the variable is missing or points to the wrong directory, the build will fail.
ChroMapperDir must be set to the full path of your ChroMapper installation directory — the root folder that directly contains the ChroMapper_Data\Managed\ subdirectory. For example, if your installation is at C:\Program Files\ChroMapper, the directory should contain:
ChroMapper_Data\
  Managed\
    Main.dll
    0Harmony.dll
    UnityEngine.CoreModule.dll
    ...
Plugins\
ChroMapper.exe
Set ChroMapperDir to C:\Program Files\ChroMapper — not to the Managed subfolder.

Setting the variable on Windows

Via System Properties (permanent):
  1. Open Start and search for Edit the system environment variables.
  2. Click Environment Variables.
  3. Under User variables, click New.
  4. Set the variable name to ChroMapperDir and the value to your ChroMapper installation path.
  5. Click OK on all dialogs, then restart any open terminals.
Via PowerShell (current session only):
$env:ChroMapperDir = "C:\Program Files\ChroMapper"
Via PowerShell (permanent, user scope):
[System.Environment]::SetEnvironmentVariable(
    "ChroMapperDir",
    "C:\Program Files\ChroMapper",
    "User"
)
After setting the variable permanently, restart Visual Studio, Rider, or any terminal you have open so they pick up the new value.
The template generates a .csproj file targeting .NET Framework 4.8. You can build from the command line with dotnet build or msbuild, but an IDE gives you IntelliSense against ChroMapper and Unity types. Recommended options: Once all of the above are in place, move on to the quickstart.

Quickstart

Install the template and create your first plugin

Build docs developers (and LLMs) love