# imnazake/gameplaymessagerouter architecture

> Architecture diagram of the GitHub repository imnazake/gameplaymessagerouter, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-15). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/imnazake/gameplaymessagerouter
- Repository: https://github.com/imnazake/gameplaymessagerouter

## Overview

Gameplay Message Router is an Unreal Engine plugin for typed, gameplay-tag-channel messaging between otherwise unconnected gameplay objects. A sender broadcasts a struct payload through the game-instance subsystem; the router matches listeners by exact or partial channel and dispatches callbacks. Receivers can register directly or use a Blueprint async action, which exposes the received channel and payload. The README also documents a Blueprint Broadcast Message node. Edges reflect the sampled implementation or explicit README workflow; the editor-node relationship to the async action is shown in its source.

Main entry points: [`Source/GameplayMessageRuntime/Private/GameFramework/GameplayMessageSubsystem.cpp`](https://github.com/imnazake/gameplaymessagerouter/blob/master/Source/GameplayMessageRuntime/Private/GameFramework/GameplayMessageSubsystem.cpp) (Message Subsystem), [`Source/GameplayMessageRuntime/Private/GameFramework/AsyncAction_ListenForGameplayMessage.cpp`](https://github.com/imnazake/gameplaymessagerouter/blob/master/Source/GameplayMessageRuntime/Private/GameFramework/AsyncAction_ListenForGameplayMessage.cpp) (Async Listener Action), [`Source/GameplayMessageRuntime/Public/GameFramework/GameplayMessageTypes.h`](https://github.com/imnazake/gameplaymessagerouter/blob/master/Source/GameplayMessageRuntime/Public/GameFramework/GameplayMessageTypes.h) (Channels and Payload Types), [`Source/GameplayMessageNodes/Private/K2Node_AsyncAction_ListenForGameplayMessages.cpp`](https://github.com/imnazake/gameplaymessagerouter/blob/master/Source/GameplayMessageNodes/Private/K2Node_AsyncAction_ListenForGameplayMessages.cpp) (Blueprint Listen Node)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_routing["Message Routing"]
  node_router["Message Subsystem"]
  node_types["Channels and Payload Types"]
  node_listener_api["Listener API"]
end

subgraph group_async["Async Listening"]
  node_async_action["Async Listener Action"]
  node_async_api["Async Listener API"]
end

subgraph group_blueprint["Blueprint Integration"]
  node_k2_node["Blueprint Listen Node"]
end

node_sender(("Gameplay Sender"))
node_receiver(("Gameplay Receiver"))
node_blueprint_sender(("Blueprint Sender"))

node_sender -->|"broadcasts"| node_router
node_router -->|"dispatches"| node_receiver
node_types -->|"defines listener options"| node_listener_api
node_async_action -->|"registers listener"| node_router
node_async_action -->|"emits received message"| node_receiver
node_k2_node -->|"uses async action"| node_async_api
node_blueprint_sender -->|"broadcasts"| node_router

click node_router "https://github.com/imnazake/gameplaymessagerouter/blob/master/Source/GameplayMessageRuntime/Private/GameFramework/GameplayMessageSubsystem.cpp"
click node_types "https://github.com/imnazake/gameplaymessagerouter/blob/master/Source/GameplayMessageRuntime/Public/GameFramework/GameplayMessageTypes.h"
click node_listener_api "https://github.com/imnazake/gameplaymessagerouter/blob/master/Source/GameplayMessageRuntime/Public/GameFramework/GameplayMessageSubsystem.h"
click node_async_action "https://github.com/imnazake/gameplaymessagerouter/blob/master/Source/GameplayMessageRuntime/Private/GameFramework/AsyncAction_ListenForGameplayMessage.cpp"
click node_async_api "https://github.com/imnazake/gameplaymessagerouter/blob/master/Source/GameplayMessageRuntime/Public/GameFramework/AsyncAction_ListenForGameplayMessage.h"
click node_k2_node "https://github.com/imnazake/gameplaymessagerouter/blob/master/Source/GameplayMessageNodes/Private/K2Node_AsyncAction_ListenForGameplayMessages.cpp"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_router,node_types,node_listener_api toneBlue
class node_async_action,node_async_api toneAmber
class node_k2_node toneMint
class node_sender,node_receiver,node_blueprint_sender toneIndigo
```

## Components

### Message Routing

- [Message Subsystem](https://github.com/imnazake/gameplaymessagerouter/blob/master/Source/GameplayMessageRuntime/Private/GameFramework/GameplayMessageSubsystem.cpp): `Source/GameplayMessageRuntime/Private/GameFramework/GameplayMessageSubsystem.cpp`
- [Channels and Payload Types](https://github.com/imnazake/gameplaymessagerouter/blob/master/Source/GameplayMessageRuntime/Public/GameFramework/GameplayMessageTypes.h): `Source/GameplayMessageRuntime/Public/GameFramework/GameplayMessageTypes.h`
- [Listener API](https://github.com/imnazake/gameplaymessagerouter/blob/master/Source/GameplayMessageRuntime/Public/GameFramework/GameplayMessageSubsystem.h): `Source/GameplayMessageRuntime/Public/GameFramework/GameplayMessageSubsystem.h`

### Async Listening

- [Async Listener Action](https://github.com/imnazake/gameplaymessagerouter/blob/master/Source/GameplayMessageRuntime/Private/GameFramework/AsyncAction_ListenForGameplayMessage.cpp): `Source/GameplayMessageRuntime/Private/GameFramework/AsyncAction_ListenForGameplayMessage.cpp`
- [Async Listener API](https://github.com/imnazake/gameplaymessagerouter/blob/master/Source/GameplayMessageRuntime/Public/GameFramework/AsyncAction_ListenForGameplayMessage.h): `Source/GameplayMessageRuntime/Public/GameFramework/AsyncAction_ListenForGameplayMessage.h`

### Blueprint Integration

- [Blueprint Listen Node](https://github.com/imnazake/gameplaymessagerouter/blob/master/Source/GameplayMessageNodes/Private/K2Node_AsyncAction_ListenForGameplayMessages.cpp): `Source/GameplayMessageNodes/Private/K2Node_AsyncAction_ListenForGameplayMessages.cpp`

### Other components

- **Gameplay Sender**
- **Gameplay Receiver**
- **Blueprint Sender**

## Connections

- Gameplay Sender → Message Subsystem: broadcasts (evidence: `README.md`)
- Message Subsystem → Gameplay Receiver: dispatches (evidence: `Source/GameplayMessageRuntime/Private/GameFramework/GameplayMessageSubsystem.cpp`)
- Channels and Payload Types → Listener API: defines listener options (evidence: `Source/GameplayMessageRuntime/Public/GameFramework/GameplayMessageSubsystem.h`)
- Async Listener Action → Message Subsystem: registers listener (evidence: `Source/GameplayMessageRuntime/Private/GameFramework/AsyncAction_ListenForGameplayMessage.cpp`)
- Async Listener Action → Gameplay Receiver: emits received message (evidence: `Source/GameplayMessageRuntime/Private/GameFramework/AsyncAction_ListenForGameplayMessage.cpp`)
- Blueprint Listen Node → Async Listener API: uses async action (evidence: `Source/GameplayMessageNodes/Private/K2Node_AsyncAction_ListenForGameplayMessages.cpp`)
- Blueprint Sender → Message Subsystem: broadcasts (evidence: `README.md`)
