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...
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
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
Method in AssemblyExtensions
Assembly.GetTypes() can throw in some cases. This extension will catch that exception and return only the types which were successfully loaded from the assembly.
Name | Description |
---|---|
Name | Description |
---|---|
Name | Description |
---|---|
Name | Description |
---|---|
Name | Description |
---|---|
Name | Description |
---|---|
Name | Description |
---|---|
Name | Description |
---|---|
Field in
Assembly
@this
Assembly.GetTypes() can throw in some cases. This extension will catch that exception and return only the types which were successfully loaded from the assembly.
Provides access to all Culture s supported by Yarn Spinner.
A subclass of DialogueViewBase that displays character names.
The DialogueRunner component acts as the interface between your game and Yarn Spinner.
A MonoBehaviour
that can present the data of a dialogue executed by a DialogueRunner to the user. The DialogueRunner uses subclasses of this type to relay information to and from the user, and to pause and resume the execution of the YarnScript
.
Provides methods for finding voice over AudioClip
s in the project matching a Yarn linetag/string ID and a language ID.
A simple implementation of VariableStorageBehaviour.
A MonoBehaviour
that produces LocalizedLine s.
Represents a line, ready to be presented to the user in the localisation they have specified.
Detects if the render pipeline is different from the one the samples were created with, and warn you that things might look odd.
An IDictionary<TKey,TValue>
that can be serialized as part of a Unity object.
A MonoBehaviour
that a DialogueRunner uses to store and retrieve variables.
Handles playback of voice over AudioClip
s referenced on YarnScript
s.
An attribute that marks a method on an object as a command.
Marks the method as a function to be registered with the running instance's library.
Shows Yarn lines on Canvas Text components.
Yarn parameter.
Inject state for any commands in this class using this static method.
The presentation status of a LocalizedLine .
Holds information about a language.
Class in Yarn.Unity
Inherits from DialogueViewBase
A subclass of DialogueViewBase that displays character names.
This class uses the character
attribute on lines that it receives to determine its content. When the view's RunLine(LocalizedLine,Action) method is called with a line whose Text contains a character
attribute, the onNameUpdate event is fired. If the line does not contain such an attribute, the onNameNotPresent event is fired instead.
This view does not present any options or handle commands. It's intended to be used alongside other subclasses of DialogueViewBase.
DialogueUI
Name | Description |
---|---|
Name | Description |
---|---|
Name | Description |
---|---|
Method in
Name | Description |
---|
Property in
Field in
Class in
Name | Description |
---|
Class in
Inherits from
Name | Description |
---|
Name | Description |
---|
Class in
Inherits from
Name | Description |
---|
Field in
Field in
Method in
Name | Description |
---|
Method in
Returns the represented by the language code in name
.
Name | Description |
---|
The .
Field in
Struct in
Name | Description |
---|
Class in
Provides access to all s supported by Yarn Spinner.
Name | Description |
---|
Field in
Method in
Returns a boolean value indicating whether name
is a valid identifier for retrieving a from .
Name | Description |
---|
true
if name is a valid name; false
otherwise.
Invoked when the dialogue is started.
Invoked when a line is received that doesn't contain a character name.
Invoked when a line is received that contains a character name. The name is given as the parameter.
IEnumerable<string>
lineIDs
|
|
Field in DialogueCharacterNameView
Invoked when a line is received that doesn't contain a character name.
Games can use this event to hide the name UI.
DialogueCharacterNameView.onNameUpdate: Invoked when a line is received that contains a character name. The name is given as the parameter.
Field in DialogueCharacterNameView
Invoked when a line is received that contains a character name. The name is given as the parameter.
DialogueCharacterNameView.onNameNotPresent: Invoked when a line is received that doesn't contain a character name.
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 once the dialogue has completed.
Dialogue.DialogueCompleteHandler
Method in DialogueViewBase
Called by the DialogueRunner to signal that the dialogue has ended, and no more lines will be delivered.
The default implementation does nothing.
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.
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
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
Whether the DialogueRunner should automatically start running dialogue after the scene loads.
The node specified by startNode will be used.
DialogueLine's voice over clip |
|
|
The display name of a language. Will be "German (Switzerland)" for "de-CH". Use this value to present the language in an English UI. |
The unique language ID used to identify a language as RFC 4646. Will be "de-CH" for "German (Switzerland)". Use this for storing settings or identifying a language. |
The languages name as called in the language itself. Will be "Deutsch (Schweiz) for "de-CH". Use this to present the language in-game so people can find their native language. |
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.
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.
Method in DialogueRunner
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.
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.
Class in Yarn.Unity
Inherits from MonoBehaviour
The DialogueRunner component acts as the interface between your game and Yarn Spinner.
dialogueLine
The name of the to retrieve.
Returns the represented by the language code in name
.
Returns a boolean value indicating whether name
is a valid identifier for retrieving a from .
Name | Description |
---|---|
Name | Description |
---|---|
Name | Description |
---|---|
Name | Description |
---|---|
Name | Description |
---|---|
Name | Description |
---|---|
Name | Description |
---|---|
Name | Description |
---|---|
Name | Description |
---|---|
Name | Description |
---|---|
Name | Description |
---|---|
Name | Description |
---|---|
Method in
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
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 |
---|
Field in
Method in
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
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
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
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
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
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
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
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 |
---|
Yarn.Unity.LocalizedLine dialogueLine
Action
onDialogueLineFinished
The ID of this dialogue option
Indicates whether this value should be presented as available or not.
The line for this dialogue option
The ID of the dialogue option's text
string
nodeName
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.
bool
overrideExistingValues
string
name
System.Func<TResult, T1, T2, T3, T4, T5>
implementation
T5
The type of the fifth parameter to the function.
string
commandName
The name of the command.
System.Action<T1, T2, T3, T4, T5>
handler
The CommandHandler
that will be invoked when the command is called.
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 |
| The name of the command. |
| The |
| The name of the command. |
| The |
| The name of the command. |
| The |
| The name of the command. |
| The |
| The name of the command. |
| The |
| The name of the command. |
| The |
| The name of the command. |
| The |
| The name of the command. |
| The |
| 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.
Method in DialogueRunner
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:
Library
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.
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.
Method in DialogueRunner
Returns true
when a node named nodeName
has been loaded.
true
if the node is loaded, false
otherwise/
Method in DialogueRunner
Remove a registered function.
After a function has been removed, it cannot be called from Yarn scripts.
AddFunction<TResult>(string, Func<TResult>)
Method in DialogueRunner
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.
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 "
.
A collection of sub-strings.
Name | Description |
---|---|
Name | Description |
---|---|
Name | Description |
---|---|
Name | Description |
---|---|
Name | Description |
---|---|
Name | Description |
---|---|
Name | Description |
---|---|
Name | Description |
---|---|
Name | Description |
---|---|
Name | Description |
---|---|
Name | Description |
---|---|
Name | Description |
---|---|
Name | Description |
---|---|
Name | Description |
---|---|
Name | Description |
---|---|
Name | Description |
---|---|
Name | Description |
---|---|
Name | Description |
---|---|
Method in
Name | Description |
---|
Method in
Name | Description |
---|
Method in
Name | Description |
---|
Property in
Property in
Gets the underlying object that runs the Yarn code.
Method in
Name | Description |
---|
Method in
Stops the .
Method in
Method in
Called by the to signal that the view should dismiss its current line from display, and clean up.
Name | Description |
---|
Class in
A MonoBehaviour
that can present the data of a dialogue executed by a to the user. The uses subclasses of this type to relay information to and from the user, and to pause and resume the execution of the YarnScript
.
The term "view" is meant in the broadest sense, e.g. a view on the dialogue (MVVM pattern). Therefore, this abstract class only defines how a specific view on the dialogue should communicate with the (e.g. display text or trigger a voice over clip). How to present the content to the user will be the responsibility of all classes inheriting from this class.
The inheriting classes will receive a and can be in one of the stages defined in DialogueLineStatus
while presenting it.
Name | Description |
---|
: The View classes that will present the dialogue to the user.
Property in
Property in
Method in
Called by the to signal that the end of a node has been reached.
This method may be called multiple times before is called. If this method returns Dialogue.HandlerExecutionType.ContinueExecution
, do not call the onComplete
method.
Name | Description |
---|
Method in
Subclasses of should override this method to be notified when a line has become interrupted, and when the line has finished being delivered by all views.
Name | Description |
---|
: The presentation status of a .
Method in
A coroutine that fades a CanvasGroup
object's opacity from from
to to
over the course of fadeTime
seconds, and then invokes onComplete
. An may be used to signal that the fade should be interrupted; if this happens, the opacity is set to to
.
Name | Description |
---|
Class in
Class in
Name | Description |
---|
Method in
This method is generally called by a "continue" button, and causes the DialogueUI to signal the to proceed to the next piece of content.
If this method is called before the line has finished appearing (that is, before the line's status changes to ), the line's status will change to , and will be called to notify the view.
Method in
Called by the to signal that a line should be displayed to the user.
Name | Description |
---|
Method in
Called by the to signal that a set of options should be displayed to the user.
When this method is called, the will pause execution until the `onOptionSelected` method is called.
Name | Description |
---|
System.Func<TResult>
implementation
The Delegate
that should be invoked when this function is called.
string
name
TResult
The type of the value that the function should return.
string
name
System.Func<TResult, T1>
implementation
T1
The type of the first parameter to the function.
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
name
System.Func<TResult, T1, T2>
implementation
T2
The type of the second parameter to the function.
string
name
System.Func<TResult, T1, T2, T3, T4>
implementation
T4
The type of the fourth parameter to the function.
string
name
System.Func<TResult, T1, T2, T3>
implementation
T3
The type of the third parameter to the function.
string
commandName
The name of the command.
System.Func<T1, T2, T3, T4, T5, T6, 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
nodeName
The name of the node.
string
name
The name of the function to remove.
string
commandName
The name of the command to remove.
Yarn.Unity.YarnProject newProject
| The name of the node. |
| The string to split. |
| The name of the node to start running from. |
| The method that should be called when the view has finished dismissing the line. |
| The name of the next node that is being entered. |
| A method that should be called to /// indicate that the DialogueRunner should continue executing. |
The array of views to be assigned. |
Signals that a conversation has started. |
Called by the DialogueRunner to indicate that the line that this view is delivering has changed state. |
Signals that the user wants to go to the next line. |
| The opacity value to start fading from, ranging from 0 to 1. |
| The opacity value to end fading at, ranging from 0 to 1. |
| A delegate to invoke after fading is complete. |
|
|
The content of the line that should be presented to the user. |
| The method that should be called after the line has been finished. |
The set of options that should be displayed to the user. |
| A method that should be called when the user has made a selection. |
views
Called by the to signal that the dialogue has ended, and no more lines will be delivered.
Called by the to signal that the view should dismiss its current line from display, and clean up.
Called by the to signal that the end of a node has been reached.
Called by the to signal that a line should be displayed to the user.
Called by the to signal that a set of options should be displayed to the user.
dialogueLine
The that has changed state.
interruption
A coroutine that fades a CanvasGroup
object's opacity from from
to to
over the course of fadeTime
seconds, and then invokes onComplete
. An may be used to signal that the fade should be interrupted; if this happens, the opacity is set to to
.
dialogueLine
dialogueOptions