Skip to content

NickF93/UEEventBus

Repository files navigation

UEEventBus

UEEventBus is a sample Unreal project that hosts the EventBus v2 plugin.

Compatibility

  • Unreal Engine: >= 5.5
  • C++: >= 20

Runtime Model

EventBus is channel-driven:

  1. Register channel.
  2. Register publisher(s).
  3. Register listener(s).
  4. Unregister listener(s).
  5. 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.

Toy Sample Lifecycle

The Toy sample pre-registers channels from a game-instance subsystem so bindings do not depend on actor/component BeginPlay order.

  1. UToyEventBusChannelsSubsystem::Initialize registers toy channels once per game instance.
  2. Toy publishers only add/remove publisher bindings in BeginPlay/EndPlay.
  3. Toy listeners can safely add listener bindings in BeginPlay.

Relevant files:

  • Source/UEEventBus/ToyEventBusChannelsSubsystem.h
  • Source/UEEventBus/ToyEventBusChannelsSubsystem.cpp
  • Source/UEEventBus/ToyStatsPublisherComponent.cpp

Architecture

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
Loading

Pub/Sub Block Diagram

flowchart LR
    P[Publisher UObject + Dispatcher] --> CH[Channel: FGameplayTag]
    CH --> L1[Listener UObject::Function]
    CH --> L2[Listener UObject::Function]
Loading

Plugin Files

  • Runtime API: Plugins/EventBus/Source/EventBus/Public/EventBus/*
  • Runtime implementation: Plugins/EventBus/Source/EventBus/Private/*
  • Editor nodes: Plugins/EventBus/Source/EventBusEditor/*

Blueprint API

UEventBusBlueprintLibrary exposes:

  • RegisterChannel
  • UnregisterChannel
  • AddPublisherValidated
  • AddPublisher
  • RemovePublisher
  • AddListenerValidated
  • AddListener
  • RemoveListener
  • GetKnownListenerFunctions

Notes

  • 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.

Docs

  • Plugins/EventBus/README.md
  • docs/EventBus_v2_Architecture.md
  • docs/EventBus_v2_API.md

About

Unreal Engine 5.5 Event Bus Manager Plugin

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors