Pretty Unity uGUI + input toolkit for mods, extracted from Overlayer v5!
Important
You must clone with submodules. Without them the build fails at CheckLitMotion.
- Clone with submodules (or init them afterwards):
git clone --recurse-submodules <this-repo-url> # or: git submodule update --init --depth 1
- Copy
Directory.Build.example.propstoDirectory.Build.propsand fill in your game paths (GamePath/GameData, optionallyIl2CppPath/Il2CppData). - Build the configuration that matches your game:
dotnet build src/O5Kit/O5Kit.csproj -c Release_Mono dotnet build src/O5Kit/O5Kit.csproj -c Release_IL2CPP
- Native math lib (needs
zig0.17+):./native/build.sh(./native/build.sh x86_64-windowsto cross). Output lands innative/zig-out/libasO5KitNative.<os>.<ext>.
- Configure once: Call
O5Boot.Configure(...)at startup with yourO5Config,O5Theme,ISpriteProvider,IFontProvider. The tween backend defaults toAutoTweenRunner: LitMotion first (compiled-in on IL2CPP, game-shipped via reflection otherwise — always probed before use, never throws), then the built-in GTweens backend.O5Kit.Core.O5Boot.Configure( config: new O5Kit.Core.O5Config { UIScale = 1f }, sprites: new MySpriteProvider(), fonts: new MyFontProvider());
- Or zero-setup:
O5Kit.Core.O5Boot.EnsureDefaults()installs bundled artwork, fonts and the built-in tween backend. No adapters needed to try controls. - Theme: swap presets or derive your own at runtime:
Applies to subsequently created controls; rebuild UI to restyle. Presets:
O5Kit.Core.O5Boot.SetTheme(O5Kit.Core.O5Theme.Dark with { PanelBG = new Color(0.1f, 0.1f, 0.15f, 1f) });
Dark,Light,Overlayer. - Fonts: load custom font files (missing slots fall back gracefully):
O5Kit.Core.O5Boot.Configure(fonts: new O5Kit.Core.FileFontProvider(regularBytes, monoBytes));
- Create controls: Use
O5Kit.Factory.O5Factory(e.g.Button(parent, onClick, "Hello", "btn_hello")) or instantiate controls (O5Button, ...) directly. - Windows: Use
O5Kit.Core.O5WindowManagerfor multi-window UI. O5Kit manages structure and z-order; visibility and open/close animation are yours (the close button raisesCloseRequestedinstead of closing):var windows = O5Kit.Core.O5WindowManager.Create(modRoot); var win = windows.Create(new O5Kit.Core.O5WindowOptions { Title = "Hello", Icon = null }); win.CloseRequested += w => w.Rect.gameObject.SetActive(false); win.Rect.gameObject.SetActive(true); var row = O5Kit.Factory.O5Factory.Row(win.Content);
- Tick every frame: Call
O5Kit.Core.O5Object.TickAll()andO5Kit.Core.O5Tooltip.Tick()from your update loop. - Hotkeys: register named shortcuts (press + optional hold) and pump them:
Pump with
O5Kit.Input.O5ShortcutManager.Register("toggle", new O5Kit.Input.O5KeyCombo(KeyCode.BackQuote, KeyCode.LeftAlt), 0.4f, onPressed: _ => Toggle(), onHeld: _ => Reset());
O5ShortcutManager.HandleUpdate()each frame; gate withIsSuspended. Combos stay rebindable viaGet(id).Combo.
Note
O5Kit targets netstandard2.1 (Mono) and net6.0 (IL2CPP). *_IL2CPP configurations define the IL2CPP symbol automatically, which enables the MelonLoader/Il2CppInterop code paths (RegisterTypeInIl2Cpp, DelegateSupport, TryCast — same pattern as Overlayer's ML && IL2CPP blocks). IL2CPP builds reference the MelonLoader/net6 assemblies via GamePath. IL2CPP support is implemented for the future; it has not been verified against an IL2CPP game yet.
O5Kit powers the settings UI of Overlayer v5. Overlayer consumes this library and keeps all game-specific logic (FxValue, tags, modules) on its own side.
Note
O5Kit is a library and cannot run standalone. Reference it from your mod and provide the resource adapters.
- O5Kit is licensed under LGPL-3.0-or-later.
- SPDX-License-Identifier:
LGPL-3.0-or-later - Copyright (C) 2026 modlist-org contributors.
- The O5Kit logo is a placeholder.
o5kit_logo.svgat the repository root will be replaced with the final logo before the first release.
- O5Kit bundled UI shapes and icons (
src/O5Kit/Asset) are modlist-org's own artwork, canonical here and consumed by Overlayer from O5Kit (seeNOTICE.md). Same license terms as O5Kit (LGPL-3.0-or-later). - O5Kit bundled fonts (SUIT, JetBrains Mono) under OFL-1.1.
- LitMotion: Submodule under
lib/LitMotion, compiled from source (Runtime only)- License: MIT
- GTweens: Submodule under
lib/GTweens, used as the built-in tween backend (O5Kit.Core.GTweenRunner, picked byAutoTweenRunnerwhen LitMotion is unavailable). Built from a patched snapshot embedded undersrc/O5Kit/ThirdParty/GTweens(see itsREADME.mdfor the deviations)- License: MIT
- UniverseLib: Parts of input handling logic in
src/O5Kit/Inputare referenced and derived from UniverseLib.- License: LGPL-2.1
- Unity assemblies (UnityEngine, Unity.Burst/Collections/Mathematics, TextMeshPro) are referenced from the game install and are not redistributed.
- All other external dependencies are managed and imported via NuGet.
Note
O5Kit is currently under active development!