Note: This document was generated by AI.
UnityModBase is an infrastructure solution for Unity mod development. The repository contains the core library and a BepInEx lifecycle adapter, primarily providing shared lifecycle, configuration, logging, hotkey, translation, and IMGUI tooling for mods.
| Directory | Description |
|---|---|
UnityModBase |
Core library with the public API and detailed integration documentation |
BepInExLauncher |
BepInEx adapter responsible for initialization, game-boot dispatch, and disposal |
UnityModBase.Test |
xUnit test project |
| Document | 简体中文 | English |
|---|---|---|
| Core library overview and quick start | README | README |
| Public API, call order, and constraints | API | API |
For a first integration, begin with the core-library README. Consult the API documentation when you need type and member details, event semantics, or threading constraints.
- Build or obtain
UnityModBase.dllandUnityModBase.BepInExLauncher.dll. - Place both files in the target game's
BepInEx/pluginsdirectory. - Reference
UnityModBase.dllfrom the mod project. - Follow the core-library quick start to register the mod user, configuration, logging, and live controls.
The bundled launcher calls the framework's Initialize, GameBootRegistry.Boot, and Dispose entry points. Mods using this launcher must not drive the global lifecycle a second time.
| Hotkey | Action |
|---|---|
F1 |
Show or hide the configuration window |
F2 |
Show or hide the log window |
F3 |
Show or hide the live controls window |
Ctrl+R |
Reload configuration for all registered users from disk |
Hotkeys, UI language, and window layout can be adjusted in UnityModBase's own configuration. Each window remembers its selected mod user and falls back to the default user if the saved user is unavailable.
Hotkey text uses + to join keys in a chord and , to separate alternative chords, for example Ctrl+F,GamepadStart+GamepadA. In configuration text, (NONE),F1 disables a hotkey while preserving its F1 chord; remove the (NONE) segment to restore it. A standalone (NONE) also disables a hotkey. Enabling it through the UI uses F12 as the fallback chord, which can then be recorded again.
Without the BepInEx launcher, the host must select safe Unity lifecycle points and call initialization, game-boot dispatch, and disposal in order. See the core-library overview and lifecycle API for the exact order and main-thread constraints.
UnityModBase uses the LGPL-3.0 license. See LICENSE.txt for details.