A modular C# library for Unity that packages up the architectural patterns I reach for in every project. Rather than reimplementing an event bus or hand-rolling timer logic each time, this library provides battle-tested, reusable implementations across ten focused modules: a type-safe event bus, five timer variants, a pushdown automata state machine, a modifier and mediator stat system, composable logic conditions, a rule system, a DontDestroyOnLoad singleton, a lightweight entity-component layer, update registration without MonoBehaviour, and fourteen utility classes. Drop any folder into a Unity project and start using it immediately.
Everything included in this library, at a glance.
A fully decoupled publish-subscribe system. Define event types as plain data structs, subscribe with optional argument support, and raise them from anywhere in the codebase. Auto-bootstrapped at startup and auto-cleared on scene load. No string keys, no reflection, no polling.
Five purpose-built timer types that self-register and self-manage: countdown, frequency-based (N ticks per second), interval (fires periodically while counting down), tick-up (counts upward and fires at intervals), and stopwatch. Each supports start, stop, pause, resume, and reset; respects scaled or unscaled time; and disposes cleanly when no longer needed. No manual delta time accumulation.
A stack-based state machine built for the real complexity of game states. Interrupt the current state without destroying it (ideal for pause menus, cutscenes, or combo transitions) then resume the previous state seamlessly. States receive full Unity physics callbacks. A constrained variant enforces additional invariants for stricter workflows.
Stack time-limited or permanent stat modifiers on any value through a query pipeline. Modifiers sort by priority, expire automatically on a timer, and clean up without manual bookkeeping. Build additive and multiplicative buff stacks, item bonuses, or debuff systems without coupling the core stat logic to anything external.
Express game conditions as composable, reusable trees rather than nested if-blocks. AND, OR, NOT, and leaf node types let you write conditions like 'enemy is visible and health above 50% and not in cover' as a structure that can be evaluated, cached, or serialized independently of the game logic that uses it.
Isolate discrete game rules as individual objects and group them into named buckets. The rule system evaluates a full rule set without coupling to the game logic that reads the result. Rules can be swapped, added, or removed at runtime. Useful for scoring systems, ability unlock conditions, and game mode variants.
A generic singleton base that finds existing instances in the scene (including inactive objects), enforces one-instance guarantees, logs duplicate warnings with the offending object name, and nulls itself on destroy. Three lines of inheritance to turn any component into a persistent cross-scene global.
Any plain C# class can receive Update, FixedUpdate, LateUpdate, and physics callbacks without being a MonoBehaviour. No proxy GameObjects, no per-state coroutines. Used internally by the state machine to tick states cleanly through the player loop.
A minimal entity and component abstraction for custom graphs that operate independently from Unity's built-in hierarchy. Useful for data-driven systems, pooled objects, or structures that should not carry the overhead of a full scene GameObject.
Fourteen utility classes covering audio, easing functions, lerp helpers, tweening, transforms, math operations, random generation, textures, visual effects, collections, components, general game helpers, coroutine utilities, and common Unity patterns. Organized by domain so you bring in only what you need.