This site is for Yarn Spinner v1, and won't be updated. Go to the current site.

Dialogue Class

Co-ordinates the execution of Yarn programs.

public class Dialogue

Constructors

Name Description
Dialogue(VariableStorage) Initializes a new instance of the Dialogue class.

Methods

Name Description
AddProgram(Program) Loads the nodes from the specified Program, and adds them to the nodes already loaded.
Continue() Starts, or continues, execution of the current Program.
ExpandFormatFunctions(String, String) Expands all format functions in a given string, using pluralisation rules specified by the given locale.
GetStringIDForNode(String) Returns the string ID that contains the original, uncompiled source text for a node.
GetTagsForNode(String) Returns the tags for the node ‘nodeName’.
NodeExists(String) Gets a value indicating whether a specified node exists in the Program.
SetNode(String) Prepares the Dialogue that the user intends to start running a node.
SetProgram(Program) Loads all nodes from the provided Program.
SetSelectedOption(Int32) Signals to the Dialogue that the user has selected a specified OptionSet.Option.
Stop() Immediately stops the Dialogue.
UnloadAll(Boolean) Unloads all nodes from the Dialogue.

Properties

Name Description
allNodes Gets the names of the nodes in the Program.
commandHandler Gets or sets the Dialogue.CommandHandler that is called when a command is to be delivered to the game.
currentNode Gets the name of the node that this Dialogue is currently executing.
dialogueCompleteHandler Gets or sets the Dialogue.DialogueCompleteHandler that is called when the dialogue reaches its end.
IsActive Gets a value indicating whether the Dialogue is currently executing Yarn instructions.
library Gets the Library that this Dialogue uses to locate functions.
lineHandler Gets or sets the Dialogue.LineHandler that is called when a line is ready to be shown to the user.
LogDebugMessage Invoked when the Dialogue needs to report debugging information.
LogErrorMessage Invoked when the Dialogue needs to report an error.
nodeCompleteHandler Gets or sets the Dialogue.NodeCompleteHandler that is called when a node is complete.
optionsHandler Gets or sets the Dialogue.OptionsHandler that is called when a set of options are ready to be shown to the user.

Fields

Name Description
DEFAULT_START The node that execution will start from.

Source

Defined in YarnSpinner/Dialogue.cs, line 299.