Skip to content

Latest commit

 

History

History
58 lines (37 loc) · 3.4 KB

README_EN.md

File metadata and controls

58 lines (37 loc) · 3.4 KB

UnityModBase

GitHub all releases GitHub release (latest by date) platform

简体中文 | English

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.

Repository structure

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

Documentation

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.

Usage guide

Using the bundled BepInEx launcher

  1. Build or obtain UnityModBase.dll and UnityModBase.BepInExLauncher.dll.
  2. Place both files in the target game's BepInEx/plugins directory.
  3. Reference UnityModBase.dll from the mod project.
  4. 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.

Default controls

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.

Using a custom host

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.

License

UnityModBase uses the LGPL-3.0 license. See LICENSE.txt for details.