An extensive dialogue system for Unity that uses the open source xNode.
A dialogue and quest system I made for Unity using the open source xNode, which is available on GitHub. This allows for easy and modular dialogue that can easily be expanded upon.
A node editor in the Unity Editor that allows developers to create easy and custom dialogue trees based on the answers given by the player. It also allows for custom events, animations and quests to be triggered!
This dialogue system allows the player to select dialogue options and follow a different branch of the dialogue tree according to the selected option.
Quests can be initiated, updated and completed through the dialogue node system using a Quest node.
It is very easy to add new nodes by inheriting the BaseNode and adding custom properties to it. These nodes can then be parsed to the user's liking. Here is an example of the DialogueNode:
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using XNode;
public class DialogueNode : BaseNode {
[Input] public int entry;
[Output] public int exit;
public DialogueCharacter character;
[TextArea(5, 10)]
public string dialogueText;
[Output(dynamicPortList = true)]
[TextArea(2, 2)]
public string[] answers;
#region AudioSettings
public AudioClip audio;
#endregion
public override string GetString()
{
return dialogueText;
}
public override DialogueCharacter GetCharacter()
{
return character;
}
}