Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Field in DialogueRunner
Whether the DialogueRunner should automatically proceed to the next line once a line has been finished.
Field in DialogueRunner
A Unity event that is called when a node is complete.
This event receives as a parameter the name of the node that just finished running.
Dialogue.NodeCompleteHandler
Field in DialogueRunner
A Unity event that is called once the dialogue has completed.
Dialogue.DialogueCompleteHandler
Field in DialogueRunner
A Unity event that is called when a node starts running.
This event receives as a parameter the name of the node that is about to start running.
Dialogue.NodeStartHandler
Field in DialogueRunner
A StringUnityEvent that is called when a Command
is received.
Use this method to dispatch a command to other parts of your game. This method is only called if the Command
has not been handled by a command handler that has been added to the DialogueRunner, or by a method on a MonoBehaviour
in the scene with the attribute YarnCommandAttribute.
When a command is delivered in this way, the DialogueRunner will not pause execution. If you want a command to make the DialogueRunner pause execution, see AddCommandHandler(string, CommandHandler)
.
This method receives the full text of the command, as it appears between the <<
and >>
markers.
AddCommandHandler(string, CommandHandler)
AddCommandHandler(string, CommandHandler)
YarnCommandAttribute: An attribute that marks a method on an object as a command.
Class in Yarn.Unity
Inherits from MonoBehaviour
The DialogueRunner component acts as the interface between your game and Yarn Spinner.
Name | Description |
---|---|
Name | Description |
---|---|
Method in
Adds a command handler. Dialogue will pause execution after the command is called.
When this command handler has been added, it can be called from your Yarn scripts like so:
If handler
is a method that returns a Coroutine
, when the command is run, the will wait for the returned coroutine to stop before delivering any more content.
Name | Description |
---|
Name | Description |
---|---|
Name | Description |
---|---|
A type of UnityEvent
that takes a single string parameter.
Whether the DialogueRunner should automatically proceed to the next line once a line has been finished.
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.
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.
Unloads all nodes from the Dialogue .
Returns the collection of tags that the node associated with the node named nodeName
.
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.
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.
Stops the Dialogue .
Gets the name of the current node that is being run.
Gets the underlying Dialogue object that runs the Yarn code.
Gets a value that indicates if the dialogue is actively running.
The variable storage object.
| The name of the command. |
| The |
Field in DialogueRunner
The name of the node to start from.
This value is used to select a node to start from when startAutomatically is called.
Field in DialogueRunner
If true, will print Debug.Log messages every time it enters a node, and other frequent events.
Field in DialogueRunner
Whether the DialogueRunner should automatically start running dialogue after the scene loads.
The node specified by startNode will be used.
Method in DialogueRunner
Adds a command handler. Dialogue will pause execution after the command is called.
When this command handler has been added, it can be called from your Yarn scripts like so:
If handler
is a method that returns a Coroutine
, when the command is run, the DialogueRunner will wait for the returned coroutine to stop before delivering any more content.
Name | Description |
---|---|
Method in DialogueRunner
Adds a command handler. Dialogue will pause execution after the command is called.
When this command handler has been added, it can be called from your Yarn scripts like so:
If handler
is a method that returns a Coroutine
, when the command is run, the DialogueRunner will wait for the returned coroutine to stop before delivering any more content.
Name | Description |
---|---|
Method in DialogueRunner
Adds a command handler. Dialogue will pause execution after the command is called.
When this command handler has been added, it can be called from your Yarn scripts like so:
If handler
is a method that returns a Coroutine
, when the command is run, the DialogueRunner will wait for the returned coroutine to stop before delivering any more content.
Name | Description |
---|---|
Method in DialogueRunner
Adds a command handler. Dialogue will pause execution after the command is called.
When this command handler has been added, it can be called from your Yarn scripts like so:
If handler
is a method that returns a Coroutine
, when the command is run, the DialogueRunner will wait for the returned coroutine to stop before delivering any more content.
Name | Description |
---|---|
Method in
Adds a command handler. Dialogue will pause execution after the command is called.
When this command handler has been added, it can be called from your Yarn scripts like so:
If handler
is a method that returns a Coroutine
, when the command is run, the will wait for the returned coroutine to stop before delivering any more content.
Name | Description |
---|
string
commandName
The name of the command.
System.Func<T1, Coroutine>
handler
The CommandHandler
that will be invoked when the command is called.
string
commandName
The name of the command.
System.Action<T1>
handler
The CommandHandler
that will be invoked when the command is called.
string
commandName
The name of the command.
System.Func<Coroutine>
handler
The CommandHandler
that will be invoked when the command is called.
string
commandName
The name of the command.
System.Action<T1, T2>
handler
The CommandHandler
that will be invoked when the command is called.
| The name of the command. |
| The |
Method in DialogueRunner
Adds a command handler. Dialogue will pause execution after the command is called.
When this command handler has been added, it can be called from your Yarn scripts like so:
If handler
is a method that returns a Coroutine
, when the command is run, the DialogueRunner will wait for the returned coroutine to stop before delivering any more content.
Name | Description |
---|---|
Method in
Adds a command handler. Dialogue will pause execution after the command is called.
When this command handler has been added, it can be called from your Yarn scripts like so:
If handler
is a method that returns a Coroutine
, when the command is run, the will wait for the returned coroutine to stop before delivering any more content.
Name | Description |
---|
Method in
Adds a command handler. Dialogue will pause execution after the command is called.
When this command handler has been added, it can be called from your Yarn scripts like so:
If handler
is a method that returns a Coroutine
, when the command is run, the will wait for the returned coroutine to stop before delivering any more content.
Name | Description |
---|
string
commandName
The name of the command.
System.Func<T1, T2, T3, T4, T5, Coroutine>
handler
The CommandHandler
that will be invoked when the command is called.
| The name of the command. |
| The |
| The name of the command. |
| The |
Method in DialogueRunner
Adds a command handler. Dialogue will pause execution after the command is called.
When this command handler has been added, it can be called from your Yarn scripts like so:
If handler
is a method that returns a Coroutine
, when the command is run, the DialogueRunner will wait for the returned coroutine to stop before delivering any more content.
Name | Description |
---|---|
Method in DialogueRunner
Adds a command handler. Dialogue will pause execution after the command is called.
When this command handler has been added, it can be called from your Yarn scripts like so:
If handler
is a method that returns a Coroutine
, when the command is run, the DialogueRunner will wait for the returned coroutine to stop before delivering any more content.
Name | Description |
---|---|
Method in DialogueRunner
Adds a command handler. Dialogue will pause execution after the command is called.
When this command handler has been added, it can be called from your Yarn scripts like so:
If handler
is a method that returns a Coroutine
, when the command is run, the DialogueRunner will wait for the returned coroutine to stop before delivering any more content.
Name | Description |
---|---|
Method in
Add a new function that returns a value, so that it can be called from Yarn scripts.
When this function has been registered, it can be called from your Yarn scripts like so:
The call
command can also be used to invoke the function:
Name | Description |
---|
Library
Name | Description |
---|
string
commandName
The name of the command.
System.Action<T1, T2, T3>
handler
The CommandHandler
that will be invoked when the command is called.
string
commandName
The name of the command.
System.Action<T1, T2, T3, T4, T5, T6>
handler
The CommandHandler
that will be invoked when the command is called.
string
commandName
The name of the command.
System.Func<T1, T2, T3, T4, Coroutine>
handler
The CommandHandler
that will be invoked when the command is called.
string
name
System.Func<TResult, T1, T2>
implementation
T2
The type of the second parameter to the function.
TResult | The type of the value that the function should return. |
|
|
T1 | The type of the first parameter to the function. |
|
|
T3 | The type of the third parameter to the function. |
| The |
|
Method in DialogueRunner
Adds a command handler. Dialogue will pause execution after the command is called.
When this command handler has been added, it can be called from your Yarn scripts like so:
If handler
is a method that returns a Coroutine
, when the command is run, the DialogueRunner will wait for the returned coroutine to stop before delivering any more content.
Name | Description |
---|---|
Method in
Adds a command handler. Dialogue will pause execution after the command is called.
When this command handler has been added, it can be called from your Yarn scripts like so:
If handler
is a method that returns a Coroutine
, when the command is run, the will wait for the returned coroutine to stop before delivering any more content.
Name | Description |
---|
string
commandName
The name of the command.
System.Func<T1, T2, T3, Coroutine>
handler
The CommandHandler
that will be invoked when the command is called.
string
name
System.Func<TResult, T1, T2, T3, T4, T5, T6>
implementation
T6
The type of the sixth parameter to the function.
string
name
System.Func<TResult, T1, T2, T3, T4>
implementation
T4
The type of the fourth parameter to the function.
| The name of the command. |
| The |
Method in DialogueRunner
Called by a DialogueViewBase derived class from dialogueViews to inform the DialogueRunner that the user intents to proceed to the next line.
string
commandName
The name of the command to remove.
Method in DialogueRunner
Returns true
when a node named nodeName
has been loaded.
Name | Description |
---|---|
true
if the node is loaded, false
otherwise/
string
nodeName
The name of the node.
string
name
System.Func<TResult, T1, T2, T3, T4, T5>
implementation
T5
The type of the fifth parameter to the function.
Method in DialogueRunner
Returns the collection of tags that the node associated with the node named nodeName
.
Name | Description |
---|---|
The collection of tags associated with the node, or null
if no node with that name exists.
String
nodeName
The name of the node.
Method in DialogueRunner
Remove a registered function.
After a function has been removed, it cannot be called from Yarn scripts.
Name | Description |
---|---|
AddFunction<TResult>(string, Func<TResult>)
string
name
The name of the function to remove.
Method in DialogueRunner
Sets the dialogue views and makes sure the callback DialogueViewBase.MarkLineComplete
will respond correctly.
Name | Description |
---|---|
The array of views to be assigned.
Method in DialogueRunner
Starts running the dialogue again.
If nodeName
is null, the node specified by startNode is attempted, followed the currently running node. If none of these options are available, an ArgumentNullException
is thrown.
Name | Description |
---|---|
string
nodeName
Method in DialogueRunner
Splits input into a number of non-empty sub-strings, separated by whitespace, and grouping double-quoted strings into a single sub-string.
This method behaves similarly to the string.Split(char[], StringSplitOptions)
method with the StringSplitOptions
parameter set to StringSplitOptions.RemoveEmptyEntries
, with the following differences:
Text that appears inside a pair of double-quote characters will not be split.
Text that appears after a double-quote character and before the end of the input will not be split (that is, an unterminated double-quoted string will be treated as though it had been terminated at the end of the input.)
When inside a pair of double-quote characters, the string \\
will be converted to \
, and the string \"
will be converted to "
.
Name | Description |
---|---|
A collection of sub-strings.
string
input
The string to split.
Class in DialogueRunner
Inherits from UnityEvent
1`
A type of UnityEvent
that takes a single string parameter.
A concrete subclass of UnityEvent
is needed in order for Unity to serialise the type correctly.
Method in DialogueRunner
Replaces this DialogueRunner's yarn project with the provided project.
Name | Description |
---|---|
Method in
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.
Name | Description |
---|
Yarn.Unity.YarnProject newProject
string
startNode
The name of the node to start running from.
|
Property in DialogueRunner
Gets the name of the current node that is being run.
Dialogue.currentNode