Made a new open source (MIT) plugin that adds a global event system to the Unreal engine.
What is it?
A loosely coupled internal global event system (GES) plugin for the Unreal Engine. Aims to solve cross-map and cross-blueprint communication for reliable and inferable event flow.
Because the events are emitted to a dynamic map of listeners you can loosely link parts of your project without needing to redo boilerplate when you change parts of the code, dynamically change environments, delete actors or e.g. load a different submap. Fire something away, and if something is interested in that information, they can do something with it; optional.
Where can I get it?
Documentation and Repo - GitHub - getnamo/global-event-system-ue4: Loosely coupled internal event system plugin for the unreal engine.
Releases - https://github.com/getnamo/global-ev…m-ue4/releases
How do I use it?
There are globally available functions that you can use to emit and bind events. At this time there are two variants for emitting (no parameters and one wildcard parameter) and one for binding events to your local functions. Each event has a domain which means you can ensure that your messages do not clash with other emitters with the same name but used for a different purpose.
Each emit is a multi-cast to all valid bound receivers. If the parameters don’t match you’ll be warned in the log with fairly verbose messages while emitting to all other valid targets.
Emits also support pinning which means you can post some state to optional listeners that join after it has been emitted (can’t miss the event).
Example Pinned Event
Imagine that you need to be notified about some actor being spawned and you can’t control when that will occur. If you pin the emit on the actor when emitted, late binds will still be notified about that event. This use case is largely to replace the ‘get all actors’ type of polling we often do (with maybe even a delay to ensure everything has settled before we poll…).
There are plenty of other use cases I’m keen on using this for, but I’m curious how this could be useful to all of you.
If you try it, let me know what you think.