Overview
MToolKit is a modular runtime framework for production Unity applications built on modern .NET practices. It treats Unity as a host for a DI-first, event-driven application, providing ready-made modules for navigation, saving, settings, audio, input, analytics, visual graph workflows, and more. The goal is to make long-lived, content-heavy Unity projects feel like structured .NET applications instead of a pile of scene scripts.
My Role
Creator, architect, and primary maintainer of MToolKit (open source, MIT-licensed).
Key Contributions
- Designed the overall architecture where Unity is the host and all core logic lives in testable .NET modules wired together with dependency injection.
- Built core composition around VContainer (DI), MessagePipe (message bus), and R3 (reactive streams) so features communicate via explicit messages and observables instead of singletons and hard links.
- Implemented a plugin-based module system (Core, MessageBus, Bootstrapper, Navigation, Components, Localization, Persistence, Settings, Audio, Music, AssetLoader, Input, Analytics, ErrorSystem, VisualGraphs, Slog, Utilities) with clear extension points and separate READMEs per module.
- Built a multi-domain save system (profiles, slots, player/world/settings/graph saves) with a pluggable backend (ES3 by default) and planned migration support.
- Created a navigation/UI stack that treats screens and modals as view models with a managed view stack, async transitions, and reactive binding via R3, instead of ad-hoc scene loads.
- Integrated localization, audio, music, asset loading, and analytics into coherent modules that can be configured or swapped without rewriting game logic.
- Defined architecture principles and docs (Unity as host, DI everywhere, event-driven design, reactive state, plugin architecture, testability under engine constraints) and enforced them across the framework.
Tech Stack
- Unity
- C# / .NET
- VContainer (dependency injection) (GitHub)
- MessagePipe (message bus) (GitHub)
- R3 (reactive programming) (GitHub)
- Serilog (structured logging) (GitHub)
- xNode for authoring visual graphs exported to DTO runtime (quests, dialogue, workflows) (GitHub)
- ES3 (default save backend)
- Unity Localization, Addressables, Unity Input System
Why This Example Matters
- Demonstrates ability to architect and maintain a large, modular Unity framework aimed at real production use, not just small samples.
- Shows deep experience with DI, message-driven design, and reactive patterns inside Unity, including how to make those patterns play nicely with engine constraints and IL2CPP.
- Provides concrete proof that I can design plugin architectures, multi-domain save systems, navigation stacks, analytics integration, and visual-graph-driven workflows that other teams can build on.
- Reinforces that I care about testability, observability, and clean module boundaries in game code, not just getting features to work once.
How to Use
MToolKit is designed to be added at the start of a Unity project as a package and used as the runtime backbone for the game:
- Add MToolKit via the Unity Package Manager (git URL or local package).
- Create a bootstrap scene with a
GlobalInstallerthat sets up the root LifetimeScope and loads your plugin configuration. - Implement a game-specific installer (
LifetimeScope) where you register your own services and views into the DI container. - Use the provided modules (Navigation, Persistence, Settings, Input, Audio, etc.) as the foundation for your game systems, communicating via MessagePipe messages and R3 observables instead of direct references.
Links
- Source code: https://github.com/michael-tiller/MToolKit