Runtime Dialog Flow
This module turns a DialogGraph asset into an interactive runtime conversation. The central orchestrator is DialogManager.
Key files
Assets/DialogGraphSystem/Scripts/Runtime/Core/DialogManager.csAssets/DialogGraphSystem/Scripts/Runtime/Core/DialogActionRunner.csAssets/DialogGraphSystem/Scripts/Runtime/Core/DialogPlayer.csAssets/DialogGraphSystem/Scripts/Runtime/Core/Effects/*
Main responsibilities
- resolve a graph by
dialogID - move between GUID-linked nodes
- display the current line or choice prompt
- handle input, skip, and autoplay
- invoke action nodes
- raise events for history and integration
- record branch paths for transcript rebuilding
Public usage
DialogManager.Instance.PlayDialogByID("intro_guard");
public DialogGraph introGraph;
void StartConversation()
{
DialogManager.Instance.StartDialog(introGraph);
}
Events
The manager exposes OnLineShown, OnChoicePicked, OnConversationReset, onDialogEnter, and onDialogExit. These are the main integration points for analytics, history, UI reactions, or game systems.
Common mistakes
- forgetting to assign
uiPanel - starting by
dialogIDwithout adding a graph mapping - using action nodes without assigning
actionRunner - assuming history alone is authoritative for exact branch reconstruction