DialogueRunner
Class in Yarn.Unity
Inherits from MonoBehaviour
Summary
The DialogueRunner component acts as the interface between your game and Yarn Spinner.
Classes
A type of UnityEvent
that takes a single string parameter.
Fields
The View classes that will present the dialogue to the user.
A StringUnityEvent that is called when a Command
is received.
A Unity event that is called once the dialogue has completed.
A Unity event that is called when a node is complete.
A Unity event that is called when a node starts running.
If true, when an option is selected, it's as though it were a line.
Whether the DialogueRunner should automatically start running dialogue after the scene loads.
The name of the node to start from.
If true, will print Debug.Log messages every time it enters a node, and other frequent events.
The YarnProject asset that should be loaded on scene start.
Methods
Adds a command handler. Dialogue will pause execution after the command is called.
Adds a command handler. Dialogue will pause execution after the command is called.
Adds a command handler. Dialogue will pause execution after the command is called.
Adds a command handler. Dialogue will pause execution after the command is called.
Adds a command handler. Dialogue will pause execution after the command is called.
Adds a command handler. Dialogue will pause execution after the command is called.
Adds a command handler. Dialogue will pause execution after the command is called.
Adds a command handler. Dialogue will pause execution after the command is called.
Adds a command handler. Dialogue will pause execution after the command is called.
Adds a command handler. Dialogue will pause execution after the command is called.
Adds a command handler. Dialogue will pause execution after the command is called.
Adds a command handler. Dialogue will pause execution after the command is called.
Adds a command handler. Dialogue will pause execution after the command is called.
Adds a command handler. Dialogue will pause execution after the command is called.
Adds a command handler. Dialogue will pause execution after the command is called.
Add a new function that returns a value, so that it can be called from Yarn scripts.
Add a new function that returns a value, so that it can be called from Yarn scripts.
Returns the collection of tags that the node associated with the node named nodeName
.
Loads all variables from the PlayerPrefs
object into the Dialogue Runner's variable storage.
Returns true
when a node named nodeName
has been loaded.
Called by a DialogueViewBase derived class from dialogueViews to inform the DialogueRunner that the user intents to proceed to the next line.
Removes a command handler.
Remove a registered function.
Starts running the dialogue again.
Saves all variables in the Dialogue Runner's variable storage into the PlayerPrefs
object.
Sets the dialogue views and makes sure the callback DialogueViewBase.MarkLineComplete
will respond correctly.
Loads any initial variables declared in the program and loads that variable with its default declaration value into the variable storage. Any variable that is already in the storage will be skipped, the assumption is that this means the value has been overridden at some point and shouldn't be otherwise touched. Can force an override of the existing values with the default if that is desired.
Replaces this DialogueRunner's yarn project with the provided project.
Splits input into a number of non-empty sub-strings, separated by whitespace, and grouping double-quoted strings into a single sub-string.
Start the dialogue from a specific node.
Properties
Gets the name of the current node that is being run.
Gets a value that indicates if the dialogue is actively running.
The variable storage object.
Last updated