-
Notifications
You must be signed in to change notification settings - Fork 0
NotifyMessage family
Every form of sending a message.
Declared in Plugins/GMP/Source/GMP/GMP/GMPUtils.h (FGMPHelper)
template<typename KeyT, typename... TArgs>
static auto NotifyObjectMessage(FSigSource InSigSrc, const TMSGKEYTyped<KeyT>& K, TArgs&&... Args);
template<typename KeyT, typename... TArgs>
static auto NotifyWorldMessage(const UWorld* InWorld, const TMSGKEYTyped<KeyT>& K, TArgs&&... Args);
template<typename KeyT, typename... TArgs>
static auto NotifyWorldMessage(const UObject* WorldContext, const TMSGKEYTyped<KeyT>& K, TArgs&&... Args);
template<typename KeyT, typename... TArgs>
static auto SendObjectMessage(FSigSource InSigSrc, const TMSGKEYTyped<KeyT>& K, TArgs&&... Args);
template<typename KeyT, typename... TArgs>
static auto SendWorldMessage(const UWorld* InWorld, const TMSGKEYTyped<KeyT>& K, TArgs&&... Args);Plus the global NotifyMessage(K, Args...) with no source.

Both dispatch. The distinction is what the last argument may be:
-
Send*accepts a trailing callable, which turns the call into a request and routes the reply back to it. See FGMPResponder. -
Notify*is the plain fire-and-forget form.
If you are not doing request/response, either name works; Notify states the intent.
Object / World / global selects the dispatch layer, not the delivery mechanism —
see Dispatch layers.
Arguments are not copied into a queue. Their addresses are packed into an FGMPTypedAddr array valid for the duration of the dispatch, and every matching listener runs synchronously before the call returns.
Two consequences:
- Passing a temporary is fine — it outlives the dispatch.
- A listener that stores a pointer to a parameter and reads it later is reading freed memory. To keep a value, copy it, or use StoreObjectMessage.
Because dispatch is synchronous, a listener may send another message, including on the same tag. Listener
lists tolerate mutation during dispatch (a listener may unlisten itself, and Times reaching zero does
exactly that). Unbounded recursion on the same tag is still your problem to avoid.
ListenMessage family · Dispatch layers · FSigSource · StoreObjectMessage
GMP · Reference wiki — one page per named thing. Guided introduction: project site · 中文站点 · measured dispatch stack Source: repository · README · README 中文
Pages here are generated from wiki/ in the main repository — edit there, not on the wiki.
Concepts
- Why a string key
- Dispatch layers
- Parameter compatibility
- Signature inference
- Key baking
- Transparent rewrite
- Jump tracing
Sending and listening
- NotifyMessage family
- ListenMessage family
- StoreObjectMessage
- MSGKEY
- FSigSource
- FSigHandle
- FGMPKey
- FGMPResponder
Dispatch internals
Reflection and data
Editor
Build