unity-event-bus

Create type-safe event buses for Unity with zero-allocation dispatch.

Updated Feb 13, 2026
One-click install
npx skills add https://github.com/MuharremTozan/Ohm-Yura --skill unity-event-bus
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: unity-event-bus
Source: https://github.com/MuharremTozan/Ohm-Yura/tree/main/.agents/skills/unity-event-bus
Command: npx skills add https://github.com/MuharremTozan/Ohm-Yura --skill unity-event-bus

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and assets (resource) components.

What problem does it solve?

Unity projects often suffer from tight coupling between subsystems, causing brittle interactions and hard maintenance. This skill provides a high-performance, type-safe messaging hub that decouples components without ScriptableObject-based channels.

Core Features & Use Cases

  • Reflection bootstrapping automatically initializes buses on game load.
  • Static, per-type EventBus<T> hubs enable O(1) dispatch with zero allocations for messages.
  • Editor-safe cleanup clears static bindings when exiting Play Mode to prevent memory leaks.

Quick Start

Define an event struct implementing IEvent, register an EventBinding in OnEnable, and raise events with EventBus<T>.

Frequently Asked Questions about unity-event-bus

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I decouple Unity game systems without using ScriptableObject channels?

You can decouple Unity game systems without ScriptableObject channels by using a type-safe event bus. It provides static, per-type EventBus<T> hubs that enable fast, deterministic dispatch of typed events across components without tight coupling.

How does a zero-allocation event bus handle message dispatch in Unity?

A zero-allocation event bus handles message dispatch using static, per-type EventBus<T> hubs. This structure enables O(1) dispatch performance for typed events, ensuring fast and deterministic messaging across runtime gameplay systems and tooling.

How do I set up a type-safe event bus in Unity?

To set up a type-safe event bus in Unity, define an event struct implementing IEvent, register an EventBinding in OnEnable, and raise events using EventBus<T>. Reflection bootstrapping automatically initializes the buses on game load.

Does this Unity event bus require manual cleanup when exiting Play Mode?

No manual cleanup is required when exiting Play Mode. The event bus features editor-safe cleanup that automatically clears static bindings, preventing memory leaks and ensuring a clean state during editor tooling development.

Why should I use a reflection-based event bus for runtime gameplay systems?

You should use a reflection-based event bus for runtime gameplay systems to achieve zero-setup initialization. It automatically bootstraps buses on game load, enabling type-safe, zero-allocation messaging without requiring complex manual wiring.

Can I use this event bus for Unity editor tooling and extensions?

Yes, you can use this event bus for Unity editor tooling and extensions. It is designed to apply to both runtime gameplay systems and editor scripts, providing fast deterministic dispatch with editor-safe cleanup to prevent memory leaks.