intermediate

Dialogue System

Node-based dialogue system with branching choices, conditions, events, and typewriter text effect.

5 scripts · 24 KB
RPGGeneral RPGs and story-driven games

Features

Branching dialogue with player choices
Condition-based branches (quest state, items, etc.)
Typewriter text animation
Speaker portraits and names
Event triggers on dialogue nodes
ScriptableObject dialogue trees

Included Scripts

/dialogue-system/
DialogueManager.cs
DialogueUI.cs
DialogueNode.cs
DialogueData.cs
DialogueCondition.cs

Setup Guide

1

Import all scripts

2

Create dialogue trees using Create > Dialogue > Dialogue Data

3

Set up the DialogueUI canvas

4

Attach DialogueManager to a persistent manager object

5

Trigger dialogue from NPCs or triggers

Code Preview

C#
// DialogueData.cs - ScriptableObject dialogue tree
[CreateAssetMenu(menuName = "Dialogue/Dialogue Data")]
public class DialogueData : ScriptableObject
{
    public string dialogueName;
    public DialogueNode[] nodes;
}

// DialogueManager.cs - Core dialogue logic
public class DialogueManager : MonoBehaviour
{
    public void StartDialogue(DialogueData dialogue) { /* ... */ }
    public void SelectChoice(int choiceIndex) { /* ... */ }
    public void AdvanceDialogue() { /* ... */ }
}

Available Individually

These scripts are also available as standalone downloads:

Related Systems