- DEMO -
- DOCS -
_______________
Stop Writing Spaghetti. Start Building Systems.
Every growing Unity project hits the same wall: components calling each other directly, fragile references breaking on prefab changes, and event spaghetti that's impossible to debug. Unity EventBus solves this with a clean, production-ready event-driven architecture that keeps your systems completely decoupled and your codebase maintainable at any scale.
_______________
Why Developers Choose Unity EventBus
Zero Allocation on the Hot Path
Events are structs dispatched through a pre-built snapshot array. No boxing, no per-frame heap allocations, no GC spikes even under thousands of events per second (see the StressTest sample).
Type-Safe by Design
Strongly-typed events via the IEvent interface catch mismatches at compile time, not at runtime.
Thread-Safe Out of the Box
Publish from background threads, Jobs, or async tasks using PublishFromThread or the EventQueue system. Events are buffered and safely dispatched to the main thread every frame, no manual marshalling required.
Async/Await Support
Wait for a specific event without coroutines or polling. Full cancellation token support keeps async flows clean and leak-free.
Automatic Memory Safety
Owner-tracked subscriptions are automatically cleaned up when a MonoBehaviour is garbage-collected.
Live Editor Debugger
The built-in Event Bus Debugger window shows every registered event type, live subscriber counts, and a rolling publish log all in real time. Debug event flow without adding a single line of instrumentation code.
Event Filtering
Subscribe with a predicate to receive only the events that matter to a specific system. Filter by player ID, team, damage type, or any field on the event.
_______________
What's Included
The package ships with a complete runtime system covering the core bus, thread-safe event queues, owner-tracked bindings, and automatic lifecycle management. Editor tools include a live debug window and editor bridge for custom workflows.
Four sample scenes with full source code cover every major use case:
_______________
Built for Professionals
Full C# sourcecode. Assembly definitions keep compile times fast and project structure clean. Compatible with Unity 2021.3 LTS through Unity 6. No external dependencies.