Next Gen Dialogue
January 1, 2026 Β· View on GitHub
Table of Contents
- Install
- Highlights
- Platforms
- Demo
- Quick Start Guide
- Core Concepts
- Modules
- Extensions
- Resolvers
- Debug
- Create Dialogue in Script
π¦ Install
Add following dependencies to manifest.json.
"dependencies": {
"com.kurisu.chris": "https://github.com/AkiKurisu/Chris.git",
"com.kurisu.ceres": "https://github.com/AkiKurisu/Ceres.git",
"com.cysharp.unitask":"https://github.com/Cysharp/UniTask.git?path=src/UniTask/Assets/Plugins/UniTask"
}
Then use git URL to download package by Unity Package Manager https://github.com/AkiKurisu/Next-Gen-Dialogue.git.
Note: Experimental features are placed in the
Modulesfolder and require installing corresponding dependencies. Check theREADME.mdin each module folder for dependencies.
β¨ Highlights
AI powered dialogue visual designer that combines traditional dialogue design patterns with AIGC to simplify your workflow.
π Core Features
- π¨ Visual Dialogue Editor - Intuitive node-based editor for creating dialogue trees visually
- π§© Modular System - Flexible module system for extending dialogue functionality
- π€ AIGC Integration - AI-powered dialogue generation and baking workflow
- β‘ Custom Actions - Seamless integration with Ceres.Flow for custom behaviors
- π Localization Support - Built-in support for multi-language dialogue content
- ποΈ Voice Synthesis - VITS integration for real-time or baked voice generation
π― Key Capabilities
- AI Bake Dialogue - Pre-generate AI dialogue content during design time
- AI Generate Novel - Let AI act as copywriter to create dialogue trees
- Runtime Debugging - Visual debugging tools to track dialogue execution
Platforms
Unity 2022.3 LTS or later, compatible with Unity 6.
Demo
Sample project for Next-Gen Dialogue v2, see AkiKurisu/Next-Gen-Dialogue-Demo for more details.

Demo Video: Bilibili
π Quick Start Guide
If you are using this plugin for the first time, it is recommended to play the following example scenes first:
1.Normal Usage.unity- Basic usage ofNextGenDialogueComponentandNextGenDialogueGraphAsset2.Editor Bake Dialogue.unity- Sample of baking AI-generated dialogue in Editor3.Build Dialogue by Code.unity- Example of creating dialogue programmatically4.Bake Novel.unity- Example of using ChatGPT to generate dialogue trees infinitely
Create a Dialogue Graph
NextGenDialogueComponent and NextGenDialogueGraphAsset are used to store dialogue data. For simplicity, they are collectively referred to as dialogue tree.
Here's a step-by-step guide to create a dialogue tree with a single dialogue and a single option:
-
Mount Component - Attach
NextGenDialogueComponentto any GameObject in your scene -
Open Editor - Click
Open Dialogue Graphbutton to enter the visual editor -
Create Dialogue Node - Right-click and create
Container/Dialoguenode (this is the dialogue container) -
Connect to Root - Connect the Parent port of the Dialogue node to the root node
You can have multiple dialogues in one dialogue tree, but only those connected to the root node will be used
-
Create Piece Node - Create
Container/Piecenode for your first dialogue fragment -
Add Content Module - Right-click Piece node β
Add ModuleβContent Module, fill in the dialogue content -
Create Option Node - Create
Container/Optionnode for dialogue options -
Connect Option - Right-click Piece node β
Add Option, then connect Piece with Option -
β οΈ Important - At least one Piece node must be added to the Dialogue as the first piece
- Right-click Dialogue node β
Collect All Piecesto collect all pieces and adjust their priority - For priority details, refer to Condition Module
- Right-click Dialogue node β
-
Save - Click the
Savebutton in the upper left corner of the editor -
Test - Enter Play Mode and click
Play DialogueonNextGenDialogueComponent
Add Custom Actions
Next-Gen Dialogue integrates with Ceres.Flow to enable custom action features.
Add ExecuteFlowModule to any node to fire a flow execution event at runtime.
For more details about Ceres.Flow, please refer to AkiKurisu/Ceres.

AI Bake Dialogue
Use AI Dialogue Baker to pre-generate AI dialogue content during design time, improving workflow efficiency without affecting your design framework.
Steps:
- Follow the basic dialogue graph design process from Create a Dialogue Graph
- Add
AI Bake Moduleto fragments or options that need AI generation - Select the LLM type you want to use
- Select nodes in order - The recognition order is based on mouse selection order. Finally select the nodes to be baked
- Preview the input content at the bottom of the editor
- Click
Bake Dialoguebutton on theAI Bake Moduleand wait for AI response - After the language model responds, a
Content Modulewill be automatically added to store the baked content - Continue generating conversations as needed
AI Generate Novel
Novel mode allows AI to act as a copywriter and planner, providing more precise control over options and fragments compared to direct AI dialogue baking.
Refer to the example scene: 4.Bake Novel.unity
Core Concepts
Understanding the fundamental concepts of Next Gen Dialogue will help you get started quickly.
Node
Next Gen Dialogue uses a node-based visual editor framework. Most features are presented through nodes. The dialogue structure consists of three main node types:
| Name | Description |
|---|---|
| Dialogue | Used to define dialogues, such as the first piece of the dialogue and other attributes |
| Piece | Dialogue piece, usually stores the core dialogue content |
| Option | Dialogue options, usually used for interaction and bridging dialogues |
Module
In addition to nodes, Next Gen Dialogue uses a flexible Module system. Modules allow you to extend dialogue functionality, such as:
- Google translation
- Localization
- Custom callbacks
- Conditional logic
- And more...
Modules
General Modules
Modules for common dialogue functionality:
| Name | Description |
|---|---|
| Content | Provide text content for Option or Piece |
| TargetID | Add jumping target dialogue fragments for Option |
| Next Piece | Specify the next dialogue segment after the Piece ends. If no option exists, jumps to the specified segment after playing the Piece content |
AIGC Modules
Built-in AIGC modules for AI-powered features:
| Name | Description |
|---|---|
| Prompt | Prompt words that provide the basis for subsequent dialogue generation |
Editor Modules
Editor modules provide useful tools for the editor workflow, such as translation.
One-click Translation
Add Editor/EditorTranslateModule to the Dialogue node, set the source language (sourceLanguageCode) and target language (targetLanguageCode), then right-click and select Translate All Contents to translate all Pieces and Options with ContentModule.
Custom Module Translation:
For modules other than ContentModule, add TranslateEntryAttribute to fields that should be translatable. Then right-click a single node to translate it.
public class ExampleModule : CustomModule
{
// Notify field can be translated
// Only works for SharedString and string
[SerializeField, Multiline, TranslateEntry]
private SharedString value;
}
Extensions
Extensions require installing additional packages or configuring environments before use.
Localization Extension
Based on UnityEngine.Localization plugin to support dialogue localization.
| Name | Description |
|---|---|
| Localized Content | Provide content for Option or Piece after getting text from localization |

VITS Speech Extension
For VITS local deployment, refer to: VITS Simple API
Note: Use VITS module with
VITSResolver. See Resolvers section for details.
| Name | Description |
|---|---|
| VITS Voice | Use VITS speech synthesis model to generate voice for Piece or Option in real time |
Bake Voice
Setup:
- Install dependencies from
Modules/VITS(seeModules/VITS/README.md) - Start the local VITS server
- Add
AIGC/VITSModuleto nodes where speech needs to be generated - Right-click and select
Bake Audio
Usage:
- If satisfied with generated audio, click
Downloadto save locally - Audio files are not retained after exiting editor if not downloaded
- After baking, VITS server is no longer needed at runtime
β οΈ Important: If
AudioClipfield is empty, runtime generation mode is enabled by default. If there's no connection, dialogue may not proceed. For baking-only usage, keep theAudioClipfield filled.
Resolvers
Resolvers detect Modules in Containers at runtime and execute preset logic such as dependency injection and behavior execution.
| Name | Description |
|---|---|
| Default Resolver | Basic resolver supporting all built-in common modules |
| VITS Resolver | Additionally detects VITS modules to generate voice in real time |
How to Switch Resolver
1. In-Scene Global Resolver
Mount VITSSetup script on any GameObject to enable VITS Resolver globally in the scene.
2. Dialogue-Specific Resolver
Add VITSResolverModule to the Dialogue node to specify the resolver for that dialogue. You can also click the Settings button in the module and select which Resolvers to replace in Advanced Settings.
Debug
Next-Gen Dialogue provides an in-editor dialogue simulator for quick preview.
You can click the Play triangle button in the right toolbar to toggle simulator panel.

Create Dialogue in Script
You can create dialogues programmatically using the scripting API. Here's an example:
using UnityEngine;
public class CodeDialogueBuilder : MonoBehaviour
{
private RuntimeDialogueBuilder _builder;
private void Start()
{
PlayDialogue();
}
private void PlayDialogue()
{
var dialogueSystem = DialogueSystem.Get();
_builder = new RuntimeDialogueBuilder();
// First Piece
_builder.AddPiece(GetFirstPiece());
// Second Piece
_builder.AddPiece(GetSecondPiece());
dialogueSystem.StartDialogue(_builder);
}
private static Piece GetFirstPiece()
{
var piece = Piece.GetPooled();
piece.AddContent("This is the first dialogue piece");
piece.ID = "01";
piece.AddOption(new Option
{
Content = "Jump to Next",
TargetID = "02"
});
return piece;
}
private static Piece GetSecondPiece()
{
var piece = Piece.GetPooled();
piece.AddContent("This is the second dialogue piece");
piece.ID = "02";
piece.AddOption(GetFirstOption());
piece.AddOption(GetSecondOption());
return piece;
}
private static Option GetFirstOption()
{
var callBackOption = Option.GetPooled();
// Add CallBack Module
callBackOption.AddModule(new CallBackModule(() => Debug.Log("Hello World!")));
callBackOption.Content = "Log";
return callBackOption;
}
private static Option GetSecondOption()
{
var option = Option.GetPooled();
option.Content = "Back To First";
option.TargetID = "01";
return option;
}
}
License
MIT
