DialogueUI Class
Displays dialogue lines to the player, and sends user choices back to the dialogue system.
public class DialogueUI : DialogueUIBehaviour
Remarks
The DialogueUI component works closely with the DialogueRunner class. It receives Lines,
OptionSets and Commands from the
DialogueRunner, and conveys them to the rest of the game. It is
also responsible for relaying input from the user to the
DialogueRunner, such as option selection or the signal to proceed
to the next line.
Methods
| Name | Description | 
|---|---|
| DialogueComplete() | Called by the DialogueRunnerto signal that the dialogue has ended. | 
| DialogueStarted() | Signals that a conversation has started. | 
| MarkLineComplete() | Signals that the user has finished with a line, or wishes to skip to the end of the current line. | 
| RunCommand(Command, Action) | Called by the DialogueRunnerto signal that a command should be executed. | 
| RunLine(Line, ILineLocalisationProvider, Action) | Called by the DialogueRunnerto signal that a line should be displayed to the user. | 
| RunOptions(OptionSet, ILineLocalisationProvider, Action | Called by the DialogueRunnerto signal that a set of options should be displayed to the user. | 
| SelectOption(Int32) | Signals that the user has selected an option. | 
Fields
| Name | Description | 
|---|---|
| dialogueContainer | The object that contains the dialogue and the options. | 
| onCommand | A DialogueRunner.StringUnityEventthat is called when aCommandis received. | 
| onDialogueEnd | A UnityEventthat is called when the dialogue ends. | 
| onDialogueStart | A UnityEventthat is called when the dialogue starts. | 
| onLineEnd | A UnityEventthat is called when a line has finished displaying, and should be removed from the screen. | 
| onLineFinishDisplaying | A UnityEventthat is called when a line has finished being delivered. | 
| onLineStart | A UnityEventthat is called when aLinehas been delivered. | 
| onLineUpdate | A DialogueRunner.StringUnityEventthat is called when the visible part of the line’s localised text changes. | 
| onOptionsEnd | A UnityEventthat is called when an option has been selected, and theoptionButtonsshould be hidden. | 
| onOptionsStart | A UnityEventthat is called when anOptionSethas been displayed to the user. | 
| optionButtons | The buttons that let the user choose an option. | 
| textSpeed | How quickly to show the text, in seconds per character | 
See Also
- DialogueRunner: The DialogueRunner component acts as the interface between your game and Yarn Spinner.
Source
Defined in Unity/Assets/YarnSpinner/Scripts/DialogueUI.cs, line 49.