
Prerequisites
- Unity 6000.3.2f1 - but it might work on older versions too, I have started on pre-6 versions.
- Odin Inspector (not required, can be removed)
From the remains of my codebase, I extracted the Dialogue Editor, polished a few details, and I am now releasing it for adoption under the MIT license. The Dialogue Editor uses Unity’s Experimental GraphView, builds dialogue nodes, and stores them in ScriptableObjects that hold references to connected nodes.
Within the graph, there are three types of nodes:
- Dialogue Node (NodeSO) – contains a Model structure holding the text for the given dialogue node. If only single choice is provided, then its Single Choice Type, otherwise its Multiple Choice Type.
- Conditional Node (ConditionalNodeSO) – evaluates a provided value against an expected value for a given enum (Attribute, Skill).
- Relay Node – used purely for visual organization and for reconnecting the same connection.
A NodeSO can contain a collection of ISetting instances that affect whether the node is visible as a dialogue choice. For example, visibility can be restricted for players with low charisma, or the node may require a specific item, intel, skill, or having visited another node within the same dialogue, and so on.
As part of the refactoring, I decided to save time by using Odin Inspector to add INodeSetting instances to individual nodes within the graph. These features are intended for more complex dialogue flows. For simple dialogues, this part can be completely removed and unused, along with the corresponding field in NodeSO.
https://github.com/fojtasd/DialogueEditorRPG
