Skip to main content

Node Reference

Complete reference for every node type in DialogueCraft. Nodes are organized into four categories: Dialogue, Flow, Data, and Sequence.

For a practical guide on using these nodes together, see Writing Dialogues.


Dialogue Nodes

Entry Node

Marks the start of a dialogue. Every dialogue has one main Entry node; additional entries can be created for alternate starting points.

Color#2E7D32 (Forest Green)
Data classEntryNodeData
PortsNo input. 1 output (right).

Fields:

FieldTypeDefaultDescription
entryPointNamestring""Name for this entry point. Empty or "default" means the main entry. Named entries are accessed via runner.StartDialogue(asset, "name").

Runtime behavior: The DialogueRunner finds the Entry node matching the requested entry point name (or the default entry), then immediately advances to the connected output node. The Entry node itself produces no visible output.

Example use case: A dialogue with separate entry points for "first_meeting" and "return_visit", allowing the same asset to serve different contexts.


Text Node

Displays a single line of dialogue from a character.

Color#1976D2 (Ocean Blue)
Data classTextNodeData
Ports1 input (left). 1 output (right).

Fields:

FieldTypeDefaultDescription
characterIdstringnullID of the speaking character (from CharacterDatabase).
dialogueTextstringnullThe dialogue text. Supports inline typewriter tags (<speed>, <pause>, <input>) and variable substitution ({VarName}).
audioClipAudioClipnullVoice audio clip (Unity audio mode).
audioClipPathstringnullLegacy audio clip path (unused in favor of direct reference).
voiceFmodEventPathstringnullFMOD event path for voice playback (FMOD audio mode).
waitForVoiceboolfalseIf true, the dialogue waits for the voice clip to finish before allowing the player to continue.
runOnceboolfalseIf true, this node only executes on the first visit. Subsequent visits skip to the next node.
nodeLabelstringnullOptional label making this node a jump target. Inherited from base class; all node types support labels.

Runtime behavior: Resolves the speaker character from the database, applies localization and variable substitution to the text, parses and strips typewriter tags, then fires the OnDialogueLine event. If typewriter is enabled, the text is revealed character-by-character with tag-driven speed/pause/input control. After the full text is displayed (and voice audio finishes, if waitForVoice is on), the runner enters WaitingForContinue state until the player advances.

Example use case: An NPC greeting the player with a voiced line: "Welcome to my shop, {PlayerName}!"


Choice Node

Presents multiple response options to the player.

Color#00897B (Teal)
Data classChoiceNodeData
Ports1 input (left). N outputs (right, one per choice).

Fields:

FieldTypeDefaultDescription
choicesList<DialogueChoice>[]List of player response options. Minimum of two.

DialogueChoice fields:

FieldTypeDefaultDescription
choiceIdstringauto-generated GUIDUnique identifier for this choice. Maps to an output port.
textstringnullDisplay text for the choice option. Supports variable substitution.
showConditionsList<Condition>[]If any condition fails (AND logic), the choice is hidden entirely.
enableConditionsList<Condition>[]If any condition fails (AND logic), the choice is visible but greyed out.
disabledTextstringnullReason text shown below a disabled choice (e.g., "Requires 50 gold").
isStickyboolfalseIf true, selecting this choice loops back to the choice node after the branch ends.

Runtime behavior: Evaluates showConditions on each choice (hidden if fail), then enableConditions (greyed out if fail). Applies localization and variable substitution to choice text and disabled text. Fires OnChoicesPresented with the filtered options. The runner enters WaitingForChoice state. When the player selects a choice via SelectChoice(index), the runner follows the corresponding output port. For sticky choices, the return point is pushed onto an internal stack so the dialogue returns to the choice menu when the branch ends.

Example use case: A shop menu with choices "Buy sword (50g)" (disabled if gold < 50), "Buy potion (10g)", and "Leave" where the first two are sticky.


Flow Nodes

Branch Node

Routes dialogue based on variable conditions. Evaluates branches top-to-bottom and follows the first match.

Color#FF8F00 (Amber)
Data classBranchNodeData
Ports1 input (left). N+1 outputs (right: one per branch case, plus Else).

Fields:

FieldTypeDefaultDescription
branchesList<BranchCase>[]Ordered list of branch cases. First passing case is followed.

BranchCase fields:

FieldTypeDefaultDescription
branchIdstringauto-generated GUIDUnique identifier for this branch. Maps to an output port.
labelstring"Case"Display label shown on the output port.
conditionsList<Condition>[]Conditions to evaluate. Empty conditions always pass.
useOrLogicboolfalseIf true, uses OR logic (any condition passes). If false, uses AND logic (all must pass).

Runtime behavior: Iterates through branches in order. For each branch, evaluates conditions using scope-aware variable lookup (supporting Global, Actor, and Local scopes). Follows the first branch where conditions pass. If no branch matches, follows the "default" (Else) output. If no Else connection exists, advances to the next connected node.

Example use case: An NPC reacting differently based on quest progress -- "quest_complete" branch if QuestStatus == "done", "quest_active" branch if QuestStatus == "active", Else for first meeting.


Random Node

Randomly selects one of several output paths using weighted probabilities.

Color#0097A7 (Cyan)
Data classRandomNodeData
Ports1 input (left). N outputs (right, labeled 1, 2, 3...).

Fields:

FieldTypeDefaultDescription
outputCountint2Number of outputs. Minimum 2.
weightsList<float>[1, 1]Weight for each output. Higher weight = higher selection probability. Negative weights are clamped to 0.

Runtime behavior: Calculates the total weight across all outputs. Generates a random value in [0, totalWeight) and selects the output whose cumulative weight range contains the random value. Follows the selected output port (output_0, output_1, etc.).

Example use case: Randomizing an NPC's greeting between three variations with equal probability.


Jump Node

Jumps to another node in the same dialogue by label, allowing non-linear flow.

Color#689F38 (Lime)
Data classJumpNodeData
Ports1 input (left). No output.

Fields:

FieldTypeDefaultDescription
targetLabelstringnullLabel of the target node to jump to.
targetNodeGuidstringnullFallback: target node GUID (used if label is empty).

Runtime behavior: First attempts to find a node matching targetLabel via DialogueGraph.GetNodeByLabel(). If not found, falls back to targetNodeGuid via DialogueGraph.GetNode(). If the target is found, processing continues from that node. If not found, logs a warning and advances normally.

Example use case: Returning to a conversation hub after a side branch, or creating a dialogue loop.


Wait Node

Pauses dialogue for a specified duration.

Color#546E7A (Blue Gray)
Data classWaitNodeData
Ports1 input (left). 1 output (right).

Fields:

FieldTypeDefaultDescription
durationfloat1.0Wait duration in seconds.
canSkipbooltrueIf true, the player can skip the wait by pressing continue.

Runtime behavior: Sets the runner state to Waiting and starts a coroutine that counts elapsed time (respecting pause state). If canSkip is true and the player calls Continue(), the wait ends immediately. After the duration elapses (or is skipped), advances to the next node.

Example use case: A dramatic pause before a reveal, or waiting for a visual effect to play.


End Node

Explicitly ends the dialogue with an optional event.

Color#C62828 (Red)
Data classEndNodeData
Ports1 input (left). No output.

Fields:

FieldTypeDefaultDescription
endEventNamestringnullOptional event name fired via OnDialogueEvent when the dialogue ends at this node.
endEventParameterstringnullOptional parameter passed with the end event.

Runtime behavior: Fires the end event (if configured) via OnDialogueEvent. Then checks internal stacks: if a sticky choice is pending, returns to the choice menu; if inside a sub-dialogue, returns to the parent dialogue. Otherwise, calls Stop() which fires OnDialogueEnd, clears local variables, and resets cameras marked for reset.

Example use case: Ending a quest dialogue with an event "quest_accepted" that triggers quest tracking in game code.


Sub-Dialogue Node

Calls another DialogueAsset and returns when it completes. Functions like a subroutine call for dialogues.

Color#3949AB (Indigo)
Data classSubDialogueNodeData
Ports1 input (left). 1 output (right).

Fields:

FieldTypeDefaultDescription
targetDialogueDialogueAssetnullThe dialogue asset to call.
entryPointNamestring""Optional entry point name within the target dialogue. Empty uses the default entry.

Runtime behavior: Pushes the current dialogue state (asset, graph, return node GUID) onto an internal stack. Switches to the target dialogue's graph and creates a merged variable store (sub-dialogue inherits parent variables). Finds the specified entry point and begins processing. When the sub-dialogue ends (via End node or dead end), pops the stack and continues from the Sub-dialogue node's output port in the parent.

Example use case: A shared shop interaction dialogue called from multiple NPC dialogues.


Data Nodes

Variable Node

Sets or modifies a variable value across Global, Actor, or Local scopes.

Color#7B1FA2 (Purple)
Data classVariableNodeData
Ports1 input (left). 1 output (right).

Fields:

FieldTypeDefaultDescription
variableNamestringnullName of the variable to modify.
operationVariableOperationSetOperation to perform.
operandValuestringnullThe value to apply (serialized as string, parsed based on variable type).
scopeVariableScopeGlobalVariable scope: Global, Actor, or Local.
actorIdstringnullCharacter ID (only used when scope is Actor).

VariableOperation enum:

ValueDescriptionApplies To
SetSet the variable to the operand value.All types
AddAdd the operand to the current value.int, float
SubtractSubtract the operand from the current value.int, float
MultiplyMultiply the current value by the operand.int, float
DivideDivide the current value by the operand.int, float
ToggleFlip a boolean value (operand ignored).bool
AppendAppend the operand string to the current value.string

Runtime behavior: Resolves the correct VariableStore based on scope (Global via SharedVariables.Global, Actor via SharedVariables.Actor(actorId), Local via SharedVariables.Local). Calls ApplyOperation() on the store with the variable name, operation, and operand. Immediately advances to the next node.

Example use case: Setting QuestAccepted = true after the player agrees to help, or incrementing Merchant.Friendship by 1 after a successful trade.


Event Node

Triggers a C# event or Unity SendMessage call.

Color#E64A19 (Deep Orange)
Data classEventNodeData
Ports1 input (left). 1 output (right).

Fields:

FieldTypeDefaultDescription
modeEventModeFireEventTriggering mode: FireEvent or SendMessage.
eventNamestringnullEvent name (FireEvent mode).
eventParameterstringnullEvent parameter (FireEvent mode).
targetObjectstringnullTarget GameObject name or actor ID (SendMessage mode).
methodNamestringnullMethod to call (SendMessage mode).
messageParameterstringnullOptional parameter for SendMessage.

Runtime behavior:

  • FireEvent mode: Invokes DialogueRunner.OnDialogueEvent with the event name and parameter. Subscribe to this event in game code to handle custom logic.
  • SendMessage mode: Resolves the target via DialogueActorResolver (supports character IDs, "speaker", "listener", and GameObject names). Calls SendMessage() on the resolved GameObject with the specified method name and optional parameter.

Immediately advances to the next node after firing.

Example use case: Firing a "give_item_sword" event that inventory code listens for, or calling PlayParticleEffect on an NPC via SendMessage.


Sequence Nodes

All sequence nodes inherit from SequenceNodeData. They control cinematic and gameplay elements during dialogue and share common patterns: most have a waitForCompletion option and execute without player input.

Timeline Node

Plays, stops, pauses, or resumes a Unity Timeline asset.

Color#1565C0 (Deep Blue)
Data classTimelineNodeData
Ports1 input (left). 1 output (right).
Requirescom.unity.timeline package (DIALOGUECRAFT_TIMELINE define).

Fields:

FieldTypeDefaultDescription
timelineUnityEngine.ObjectnullThe PlayableAsset (Timeline) to control.
actionTimelineActionPlayAction: Play, Stop, Pause, or Resume.
waitForCompletionbooltrueWait for the timeline to finish before advancing (Play action only).
canSkipbooltrueIf true, the player can skip the playing timeline (Play action only).

TimelineAction enum:

ValueDescription
PlayPlay the timeline from the start.
StopStop the timeline and reset to time 0.
PausePause the timeline at the current position (sets playable speed to 0).
ResumeResume a paused timeline (restores playable speed to 1).

Runtime behavior: For Play action, first searches the scene for an existing PlayableDirector with the assigned asset (preserving track bindings). If found, plays it directly; otherwise falls back to DialogueTimelineController. For Stop/Pause/Resume, locates the director and controls it accordingly. If waitForCompletion is true, the runner polls the director state until playback completes or the player skips.

Example use case: Playing a cutscene showing a bridge collapsing during dialogue.


Camera Node

Switches to a Cinemachine virtual camera by name.

Color#6A1B9A (Purple)
Data classCameraNodeData
Ports1 input (left). 1 output (right).
Requirescom.unity.cinemachine package (optional; DIALOGUECRAFT_CINEMACHINE define).

Fields:

FieldTypeDefaultDescription
cameraNamestringnullName of the Cinemachine virtual camera GameObject to activate.
priorityint10Priority to set when activating the camera.
blendTimefloat0.5Camera blend duration in seconds. 0 = instant cut.
resetOnDialogueEndbooltrueIf true, the camera priority is reset when the dialogue ends.
waitForBlendboolfalseIf true, wait for the blend to complete before advancing to the next node.

Runtime behavior: Activates the named camera via DialogueCameraController with the specified priority. If resetOnDialogueEnd is true, the camera name is tracked and deactivated when the dialogue stops. If waitForBlend is true, waits for blendTime seconds before advancing.

Example use case: Cutting to a close-up camera during an important dialogue reveal.


Fade Node

Fades the screen in or out using a full-screen overlay.

Color#37474F (Dark Gray)
Data classFadeNodeData
Ports1 input (left). 1 output (right).

Fields:

FieldTypeDefaultDescription
modeFadeModeOutIn (from color to transparent, revealing scene) or Out (from transparent to color, hiding scene).
durationfloat1.0Fade duration in seconds.
colorColorblackFade overlay color.
waitForCompletionbooltrueIf true, wait for the fade to finish before advancing.

Runtime behavior: Fires a dialogue event (Fade_In or Fade_Out) with the duration as parameter. Uses the built-in FadeOverlay singleton for the visual effect. If waitForCompletion is true, waits until the fade animation completes before advancing.

Example use case: Fading to black before a scene transition, or fading in to reveal a new location.


Audio Node

Plays or stops an audio clip through the configured audio backend (Unity or FMOD).

Color#E65100 (Orange)
Data classAudioNodeData
Ports1 input (left). 1 output (right).

Fields:

FieldTypeDefaultDescription
audioClipAudioClipnullAudio clip to play (Unity audio mode).
fmodEventPathstringnullFMOD event path, e.g. "event:/Music/Combat" (FMOD audio mode).
fmodParameterNamestringnullOptional FMOD parameter name for runtime control.
fmodParameterValuefloat0FMOD parameter value.
volumefloat1.0Playback volume (0 to 1).
channelAudioChannelSFXAudio routing channel: SFX, Music, Voice, or Ambient.
waitForCompletionboolfalseIf true, wait for the audio to finish before advancing (ignored for looping audio).
loopboolfalseIf true, loop the audio continuously.
stopInsteadboolfalseIf true, stop audio on the specified channel instead of playing.
fadeInDurationfloat0Fade-in duration in seconds. 0 = instant start.
fadeOutDurationfloat0Fade-out duration for stop commands. 0 = instant stop.
eventOnlyboolfalseIf true, only fire dialogue events without playing audio. Game code handles playback externally.

Runtime behavior: If eventOnly is true, fires a dialogue event and advances. If stopInstead is true, stops audio on the channel (with optional fade-out) and advances. Otherwise, builds an AudioPlaybackRequest and plays via AudioProviderManager. If waitForCompletion is true and audio is not looping, waits for playback to complete. Fires dialogue events like Audio_Play_Music for external tracking.

Example use case: Starting background battle music with a 1-second fade-in, or playing a one-shot sound effect for a door opening.


Actor Node

Controls character positioning and visibility at runtime.

Color#00796B (Teal)
Data classActorNodeData
Ports1 input (left). 1 output (right).

Fields:

FieldTypeDefaultDescription
actorIdstringnullActor identifier: character ID, "speaker", "listener", "player", "tag:TagName", or GameObject name.
actionActorActionLookAtAction to perform.
targetIdstringnullTarget for LookAt/Face/MoveTo: another actor ID, transform name, or waypoint.
durationfloat0.5Duration for smooth movement/rotation. 0 = instant.
waitForCompletionbooltrueWait for the action to complete before advancing.
activeStatebooltrueFor SetActive action: true = show, false = hide.

ActorAction enum:

ValueDescription
LookAtRotate head/eyes to look at the target.
FaceRotate the whole body to face the target (Y-axis locked for upright rotation).
MoveToWalk/move to the target position. Uses NavMeshAgent if available; otherwise lerps.
SetActiveShow or hide the actor's GameObject.

Runtime behavior: Resolves the actor GameObject via DialogueActorResolver. For SetActive, sets the GameObject's active state immediately and advances. For LookAt/Face/MoveTo, resolves the target transform and starts a coroutine: rotation uses Quaternion.Slerp over the duration; movement uses NavMeshAgent.SetDestination if available or Vector3.Lerp as fallback. After completion, advances to the next node.

Example use case: Having an NPC walk to a waypoint and turn to face the player before speaking.


Animate Node

Controls character animations via Unity's Animator component.

Color#C2185B (Pink)
Data classAnimateNodeData
Ports1 input (left). 1 output (right).

Fields:

FieldTypeDefaultDescription
actorIdstringnullActor identifier (same resolution as Actor node).
modeAnimateModeTriggerHow to control the Animator.
parameterNamestringnullAnimator parameter name (for Trigger/SetBool/SetInt/SetFloat) or state name (for PlayState).
boolValueboolfalseBool value (SetBool mode).
intValueint0Int value (SetInt mode).
floatValuefloat0Float value (SetFloat mode).
layerint0Animator layer (PlayState mode).
crossfadeDurationfloat0.25Crossfade transition duration in seconds (PlayState mode).
waitForCompletionboolfalseWait for animation to complete (PlayState mode only).

AnimateMode enum:

ValueDescription
TriggerSet a trigger parameter (one-shot animations).
SetBoolSet a bool parameter (state toggles).
SetIntSet an integer parameter (blend trees).
SetFloatSet a float parameter (blend trees).
PlayStateCrossfade to a specific state by name.

Runtime behavior: Resolves the Animator via DialogueActorResolver.ResolveAnimator(). For Trigger/SetBool/SetInt/SetFloat modes, sets the parameter immediately and advances. For PlayState mode, calls CrossFadeInFixedTime() on the target state; if waitForCompletion is true, waits for the crossfade plus the animation duration before advancing.

Example use case: Triggering a "wave" animation when an NPC greets the player, or setting isSitting to true when an NPC sits down.


Signal Node

Waits for an external game signal before continuing the dialogue. Bridges game events with dialogue flow.

Color#F9A825 (Yellow)
Data classSignalNodeData
Ports1 input (left). 1 output (right).

Fields:

FieldTypeDefaultDescription
signalNamestringnullSignal name to wait for. Case-insensitive matching.
timeoutfloat0Maximum wait time in seconds. 0 = wait forever.
continueOnTimeoutbooltrueIf true, continue the dialogue when the timeout expires. If false, stop the dialogue entirely.

Runtime behavior: Sets the runner state to Waiting and stores the signal name as pending. A coroutine polls for the signal each frame. Game code calls DialogueRunner.SendSignal("name") to deliver the signal. When the signal is received, the runner advances to the next node. If a timeout is specified and expires before the signal arrives, the runner either continues or stops based on continueOnTimeout.

Example use case: Waiting for a door animation to finish (runner.SendSignal("door_opened")) or pausing dialogue until a battle completes.


Shake Node

Shakes the camera or UI for visual impact effects.

Color#E65100 (Orange)
Data classShakeNodeData
Ports1 input (left). 1 output (right).

Fields:

FieldTypeDefaultDescription
intensityfloat0.5Shake intensity (0 to 1 recommended range).
durationfloat0.3Shake duration in seconds.
targetShakeTargetCameraWhat to shake.
waitForCompletionboolfalseIf true, wait for the shake to finish before advancing.

ShakeTarget enum:

ValueDescription
CameraShake the main camera. Uses Cinemachine Impulse when available.
UIShake the dialogue UI panel.
BothShake both camera and UI simultaneously.

Runtime behavior: Fires a Shake dialogue event with intensity, duration, and target as parameters. Calls DialogueShakeController.ShakeCamera() and/or DialogueShakeController.ShakeUI() based on the target. If waitForCompletion is true, waits for the shake duration before advancing.

Example use case: A camera shake when an explosion occurs during dialogue.


Spawn Node

Instantiates or destroys GameObjects during dialogue.

Color#388E3C (Green)
Data classSpawnNodeData
Ports1 input (left). 1 output (right).

Fields:

FieldTypeDefaultDescription
actionSpawnActionSpawnAction: Spawn (instantiate) or Destroy.
prefabGameObjectnullPrefab to instantiate (Spawn action only).
spawnPointIdstringnullSpawn point identifier: actor ID, "speaker", "listener", "tag:TagName", or Transform/GameObject name.
parentToSpawnPointboolfalseIf true, parent the spawned object to the spawn point transform.
objectNamestringnullFor Spawn: name assigned to the spawned instance. For Destroy: name of the GameObject to find and destroy.
destroyDelayfloat0Delay before destroying in seconds (Destroy action only).

SpawnAction enum:

ValueDescription
SpawnInstantiate a prefab at the spawn point.
DestroyFind and destroy a GameObject by name.

Runtime behavior: For Spawn, resolves the spawn point via DialogueActorResolver.ResolveTransform(). Instantiates the prefab at the spawn point's position/rotation (or at origin if no spawn point). If parentToSpawnPoint is true, parents the instance to the spawn point with zeroed local position/rotation. Names the instance if objectName is set. Fires a Spawn dialogue event. For Destroy, finds the target via GameObject.Find() and destroys it (with optional delay). Fires a Destroy dialogue event. Advances immediately after the action.

Example use case: Spawning a quest item on a table during a cutscene, or destroying a barrier after an NPC opens a gate.


Utility Nodes

Comment Node

Designer notes placed on the graph. No runtime effect.

Color#555566 (Gray)
Data classCommentNodeData
PortsNone.

Fields:

FieldTypeDefaultDescription
commentTextstringnullThe comment text.
backgroundColorColor(0.2, 0.2, 0.2, 0.8)Background color of the comment node.

Runtime behavior: Completely skipped. The DialogueRunner immediately advances to the next node. Comment nodes exist purely for editor-time organization.

Example use case: Annotating a complex branch with "This path handles the evil ending."


Shared Data Types

Condition

Used by Branch nodes and Choice node conditions. Supports comparing a variable to a literal value or to another variable, with scope-aware lookup.

FieldTypeDefaultDescription
variableNamestringnullName of the variable to check.
conditionOperatorConditionOperatorEqualsComparison operator.
compareValuestringnullValue to compare against (literal or variable name if compareToVariable is true).
scopeVariableScopeGlobalScope of the variable being checked.
actorIdstringnullActor ID when scope is Actor.
compareToVariableboolfalseIf true, compareValue is treated as a variable name for variable-to-variable comparison.
compareScopeVariableScopeGlobalScope of the compare variable (when compareToVariable is true).
compareActorIdstringnullActor ID for the compare variable (when compareScope is Actor).

NodeConnection

Represents an edge between two nodes in the graph.

FieldTypeDescription
fromNodeGuidstringGUID of the source node.
fromPortIdstringPort identifier on the source node.
toNodeGuidstringGUID of the target node.
toPortIdstringPort identifier on the target node.

GroupData (Comment Box)

Resizable background region for visually organizing nodes. Moving the box moves overlapping nodes; deleting the box does not delete contained nodes.

FieldTypeDefaultDescription
guidstringauto-generatedUnique identifier.
titlestring"Comment"Title text shown in the header.
positionVector2--Position on the graph canvas.
sizeVector2(300, 200)Width and height of the box.
colorColor(0.15, 0.15, 0.15, 0.8)Background color.
hoverTextstring""Tooltip text shown when hovering over the header.