UEEventBus is a sample Unreal project that hosts the EventBus v2 plugin.
- Unreal Engine:
>= 5.5 - C++:
>= 20
EventBus is channel-driven:
- Register channel.
- Register publisher(s).
- Register listener(s).
- Unregister listener(s).
- Unregister publisher(s).
The plugin keeps an internal runtime history of successful bindings for BP ergonomics. No manual registry setup is required. History is bounded and auto-prunes invalid class entries.
The Toy sample pre-registers channels from a game-instance subsystem so bindings do not depend on actor/component BeginPlay order.
UToyEventBusChannelsSubsystem::Initializeregisters toy channels once per game instance.- Toy publishers only add/remove publisher bindings in
BeginPlay/EndPlay. - Toy listeners can safely add listener bindings in
BeginPlay.
Relevant files:
Source/UEEventBus/ToyEventBusChannelsSubsystem.hSource/UEEventBus/ToyEventBusChannelsSubsystem.cppSource/UEEventBus/ToyStatsPublisherComponent.cpp
flowchart LR
Typed[Typed C++ API] --> Core[FEventBus Core]
BP[Blueprint Library + Subsystem] --> Core
Editor[Filtered Custom K2 Nodes] --> BP
Game[Game Actors/Components] --> Typed
Game --> BP
flowchart LR
P[Publisher UObject + Dispatcher] --> CH[Channel: FGameplayTag]
CH --> L1[Listener UObject::Function]
CH --> L2[Listener UObject::Function]
- Runtime API:
Plugins/EventBus/Source/EventBus/Public/EventBus/* - Runtime implementation:
Plugins/EventBus/Source/EventBus/Private/* - Editor nodes:
Plugins/EventBus/Source/EventBusEditor/*
UEventBusBlueprintLibrary exposes:
RegisterChannelUnregisterChannelAddPublisherValidatedAddPublisherRemovePublisherAddListenerValidatedAddListenerRemoveListenerGetKnownListenerFunctions
- All binding add APIs (
AddPublisherValidated,AddPublisher,AddListenerValidated,AddListener) perform runtime checks and do not require pre-authored rule tables. - Channel signature is inferred by first publisher delegate bound on channel.
- Listener identity is tracked by instance + function.
Plugins/EventBus/README.mddocs/EventBus_v2_Architecture.mddocs/EventBus_v2_API.md