SideXP - Broadcaster (Unity)¶
Code-first, type-keyed, intention-driven event bus for decoupled communication in Unity games and packages.
Events are very good for decoupling systems. You may be familiar with events (C# event keyword or UnityEvent for example). But at some point in a project, events can feel too limited and messy, making some behaviors blurry especially if you combine code and inspector listeners.
Broadcaster combines 2 approaches to make events usable for any kind of project, whether it's a prototype or a final production:
- Events are type-keyed, which means that instead of naming them using arbitrary strings or reaching a variable in a component, you just use their actual C# type, which is both their identity and payload.
- Events are intention-driven, which means that depending on the nature of an event (a notification, a question, an order, ...), you will use a specific kind of event but always through the same channel.
using SideXP.Broadcaster;
// Declare an event by just creating a new class or struct
[Event("The score of the player has just changed.")]
public struct PlayerScoreChanged : ISignal { public int score; }
// Subscribe/unsubscribe to a typed signal
void OnEnable() => Broadcaster.Subscribe<PlayerScoreChanged>(this, signal => scoreUI.text = signal.score.ToString());
void OnDisable() => Broadcaster.UnregisterAll(this);
// Emit a signal
Broadcaster.Emit(new PlayerScoreChanged { score = 1200 });
Why use it¶
- Four intentful event kinds: Signals announce, Commands instruct, Requests ask, Cues coordinate timed reactions. The kind you choose is a contract, not just a channel.
- Type-safe and code-first: events are plain types, checked by the compiler. No string keys, no assets to wire up.
- Decoupled by construction: owner-based registration and one-line cleanup (
UnregisterAll(this)): no dangling subscriptions, no references between systems. - First-class async! Commands, Requests, and Cues can be awaited, with cancellation, and an in-flight await never hangs even if its handler goes away mid-flight.
- Observable out of the box: an Events catalog and a Timeline recorder window, at zero cost in a shipped build.
- Testable in isolation: a private
EventBusper test: no scenes, no singletons, no teardown.

Installation¶
Option 1: Using the Package Manager¶
- In your Unity project, go to
Window > Package Management > Package Manager(orWindow > Package Managerfor Unity 6.0-) - Click on the + icon in the top-left corner, and select Install package from Git URL...
- In the text field, enter the URL to this package's repository (including the
*.gitextensions), and click Install - Wait for Unity to get the files, and you're ready to go!
Tip: if you need to use a specific version of this package for your project, add
#<tag-name>to the URL before clicking on the Install button.
Option 2: Extracting archive manually¶
- Go to this project's
/releaseslist - Download the ZIP file archive of your desired version
- Extract the content of that archive into the
Packages/folder of your Unity project - Wait for Unity to reload the solution, and you're ready to go!
Tip: to avoid any path issue, make sure the folder that contains the package content has the same name as the
nameproperty defined in itspackage.jsonfile.
Documentation & Help¶
If you need help or just want to chat with the community and the Sideways Experiments core team, you're welcome to join our Discord server!
Contributing¶
Do you want to get involved in our projects? Check our contributing guidelines to learn more!
License¶
This project is licensed under the MIT License.
Crafted and maintained with love by Sideways Experiments
© 2022-2026 Sideways Experiments