Step 3: Wire Up the Runtime
Categories:
Step 3 — Wire Up the Runtime
The Dialogue Editor is for authoring. To play dialogue at runtime, you need three components on entities in your level.
The Dialogue Manager
The Dialogue Manager is a GS_Play manager that owns the active dialogue database and provides the top-level API.
- Your Game Manager prefab should already spawn a GS_DialogueManager (it is part of the GS_Cinematics manager set)
- If not, create a manager entity and add the
GS_DialogueManagerComponent - In the component properties, set the Dialogue Database field to your
.dialoguedatabaseasset
The manager provides the entry point API: StartDialogueSequenceByName("MerchantGreeting").
The Dialogue Sequencer
The sequencer is the component that actually executes the graph — stepping through nodes, waiting for text display, and handling player choices.
- On your NPC entity (or a dedicated dialogue entity), add a
DialogueSequencerComponent - No configuration needed — the sequencer receives commands from the manager
The Dialogue UI Bridge
The UI Bridge connects the sequencer to your UI display components. It routes dialogue text to the correct UI panel and relays player choices back.
- On the same entity as the sequencer (or a shared UI entity), add a
DialogueUIBridgeComponent - It will automatically discover registered UI components in the scene
Triggering Dialogue
To start dialogue from gameplay code or ScriptCanvas:
// C++ via EBus
DialogueManagerRequestBus::Broadcast(
&DialogueManagerRequests::StartDialogueSequenceByName,
"MerchantGreeting"
);
Or connect it to an interaction trigger — when the player interacts with the merchant entity, fire StartDialogueSequenceByName.
Component Summary
| Component | Entity | Purpose |
|---|---|---|
GS_DialogueManagerComponent | Manager entity | Owns database, provides start/stop API |
DialogueSequencerComponent | NPC or dialogue entity | Executes the graph step by step |
DialogueUIBridgeComponent | Same or shared entity | Routes text/choices between sequencer and UI |
Next: Display Dialogue In-Game