Setting up the UI
Continuing off of the UI from the last example, you can now make a button and save it as a prefab and delete it from the scene, we’ll instantiate this later to use it for making the choices!Writing the Dialogue
Create a folder atResources/English/Choice/
Right click inside the folder to create a ParleyGraph from Create/Parley/Graph and name it en.Example.
After double clicking the graph to open it, you will be greeted with the the graph view where you’ll be doing the visual design of your dialogues.
From the Context Menu, create a StartNode.
Drag from the out port on the StartNode and select DialogueNode.
Create a few dialogue nodes and fill their Speaker and Text fields with whatever you want, you can use the example below as reference or copy the same structure and text.
Setting up the Script
And with that, we’re ready to get into the script side of things! Create the following C# script:ChoiceExample.cs
Wiring things up
Back in the Unity editor, add theChoiceExample.cs script to a GameObject in your scene, and set the Button Prfab from the UI section.