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...
Name | Description |
---|---|
Name | Description |
---|---|
Name | Description |
---|---|
Name | Description |
---|---|
Name | Description |
---|---|
Class in
Name | Description |
---|
Method in
Immediately stops the .
The will not be called if the dialogue is ended by calling .
Contains the built-in types available in the Yarn language.
Co-ordinates the execution of Yarn programs.
A type that represents functions.
A collection of functions that can be called from Yarn programs.
A simple concrete implementation of IVariableStorage that keeps all variables in memory.
A node of Yarn script, contained within a Program , and containing Yarn.Instruction
s.
A compiled Yarn program.
Represents the method that is called when the Dialogue delivers a Command .
Represents the method that is called when the dialogue has reached its end, and no more code remains to be run.
Represents the method that is called when the Dialogue delivers a Line .
Represents a method that receives diagnostic messages and error information from a Dialogue .
Represents the method that is called when the Dialogue reaches the end of a node.
Represents the method that is called when the Dialogue begins executing a node.
Represents the method that is called when the Dialogue delivers an OptionSet .
Represents the method that is called when the dialogue anticipates that it will deliver lines.
Defines properties that describe a type in the Yarn language.
Provides a mechanism for storing and retrieving instances of the Yarn.Value
class.
Contains classes for compiling Yarn code.
Contains classes for working with markup in Yarn lines.
Contains classes for working with Yarn Spinner in the Unity game engine.
A command, sent from the Dialogue to the game.
A line of dialogue, sent from the Dialogue to the game.
Property in Dialogue
Gets or sets the CommandHandler that is called when a command is to be delivered to the game.
Property in BuiltinTypes
Gets a dictionary that maps CLR types to their corresponding Yarn types.
Gets the type representing any value. |
Gets the type representing boolean values. |
Gets the type representing numbers. |
Gets the type representing strings. |
Gets a dictionary that maps CLR types to their corresponding Yarn types. |
Struct in Yarn
Inherits from System.ValueType
A command, sent from the Dialogue to the game.
You do not create instances of this struct yourself. They are created by the Dialogue during program execution.
Dialogue.CommandHandler: Gets or sets the CommandHandler that is called when a command is to be delivered to the game.
Delegate in Yarn
Inherits from System.MulticastDelegate
Represents the method that is called when the Dialogue delivers a Command .
LineHandler: Represents the method that is called when the Dialogue delivers a Line .
OptionsHandler: Represents the method that is called when the Dialogue delivers an OptionSet .
NodeStartHandler: Represents the method that is called when the Dialogue begins executing a node.
NodeCompleteHandler: Represents the method that is called when the Dialogue reaches the end of a node.
DialogueCompleteHandler: Represents the method that is called when the dialogue has reached its end, and no more code remains to be run.
Class in Yarn
Inherits from System.Object
Co-ordinates the execution of Yarn programs.
Method in Dialogue
Replaces all substitution markers in a text with the given substitution list.
This method replaces substitution markers - for example, {0}
with the corresponding entry in substitutions
. If text
contains a substitution marker whose index is not present in substitutions
, it is ignored.
text
, with the content from substitutions
inserted.
Name | Description |
---|---|
Name | Description |
---|---|
Name | Description |
---|---|
Name | Description |
---|---|
Name | Description |
---|---|
Name | Description |
---|---|
Name | Description |
---|---|
Name | Description |
---|---|
Method in
Loads the nodes from the specified , and adds them to the nodes already loaded.
If Yarn.Dialogue.Program
is null
, this method has the effect as calling .
Name | Description |
---|
Method in
The or is called. After calling either of these handlers, the Dialogue will wait until is called. Continue may be called from inside the or , or may be called at any future time.
The is called. When this occurs, the Dialogue is waiting for the user to specify which of the options has been selected, and must be called before is called again.)
The Program reaches its end. When this occurs, must be called before is called again.
This method has no effect if it is called while the is currently in the process of executing instructions.
: Represents the method that is called when the Dialogue delivers a .
: Represents the method that is called when the Dialogue delivers an .
: Represents the method that is called when the Dialogue delivers a .
: Represents the method that is called when the Dialogue reaches the end of a node.
: Represents the method that is called when the dialogue has reached its end, and no more code remains to be run.
Property in
Method in
Parses a line of text, and produces a containing the results.
The 's will have any select
, plural
or ordinal
markers replaced with the appropriate text, following this 's .
Name | Description |
---|
Method in
Because the class is designed to be unaware of the contents of the string table, this method does not test to see if the string table contains an entry with the line ID. You will need to test for that yourself.
Name | Description |
---|
Method in
Loads all nodes from the provided .
This method replaces any existing nodes have been loaded. If you want to load nodes from an additional Program, use the method.
Name | Description |
---|
Method in
Method in
Name | Description |
---|
Method in
Prepares the that the user intends to start running a node.
After this method is called, you call to start executing it.
If has been set, it may be called when this method is invoked, as the Dialogue determines which lines may be delivered during the startNode
node's execution.
Name | Description |
---|
Property in
If has never been called, this value will be null
.
Method in
Name | Description |
---|
Method in
Signals to the that the user has selected a specified .
After the Dialogue delivers an , this method must be called before is called.
The ID number that should be passed as the parameter to this method should be the field in the that represents the user's selection.
Name | Description |
---|
: Represents the method that is called when the Dialogue delivers an .
: A set of s, sent from the to the game.
: Starts, or continues, execution of the current Program.
Property in
Gets or sets the that is called when a set of options are ready to be shown to the user.
The Options Handler delivers an to the game. Before can be called to resume execution, must be called to indicate which was selected by the user. If is not called, an exception is thrown.
Method in
Name | Description |
---|
Name | Description |
---|
Property in
Property in
Property in
Gets or sets the that is called when the dialogue reaches its end.
Method in
Name | Description |
---|
Property in
Property in
Gets or sets the 's locale, as an IETF BCP 47 code.
Gets the text of the command.
Yarn.IVariableStorage variableStorage
The IVariableStorage that this Dialogue should use.
Yarn.Command command
The Command that has been delivered.
Initializes a new instance of the Dialogue class.
The node that execution will start from.
Loads the nodes from the specified Program , and adds them to the nodes already loaded.
Starts, or continues, execution of the current Program.
Replaces all substitution markers in a text with the given substitution list.
Returns the string ID that contains the original, uncompiled source text for a node.
Returns the tags for the node nodeName
.
Gets a value indicating whether a specified node exists in the Program.
Parses a line of text, and produces a MarkupParseResult containing the results.
Prepares the Dialogue that the user intends to start running a node.
Loads all nodes from the provided Program .
Immediately stops the Dialogue .
Unloads all nodes from the Dialogue.
Gets or sets the CommandHandler that is called when a command is to be delivered to the game.
Gets the name of the node that this Dialogue is currently executing.
Gets or sets the DialogueCompleteHandler that is called when the dialogue reaches its end.
Gets a value indicating whether the Dialogue is currently executing Yarn instructions.
Gets or sets the Dialogue 's locale, as an IETF BCP 47 code.
Gets the Library that this Dialogue uses to locate functions.
Gets or sets the LineHandler that is called when a line is ready to be shown to the user.
Invoked when the Dialogue needs to report debugging information.
Invoked when the Dialogue needs to report an error.
Gets or sets the NodeCompleteHandler that is called when a node is complete.
Gets the names of the nodes in the currently loaded Program.
Gets or sets the NodeStartHandler that is called when a node is started.
Gets or sets the OptionsHandler that is called when a set of options are ready to be shown to the user.
Gets or sets the PrepareForLinesHandler that is called when the dialogue anticipates delivering some lines.
Gets or sets the object that provides access to storing and retrieving the values of variables.
string
text
The text containing substitution markers.
System.Collections.Generic.IList<string>
substitutions
The list of substitutions.
| The line of text to parse. |
| The name of the node. |
| The name of the node. |
| The name of the node. |
| The ID number of the Option that the user selected. |
| The name of the variable to retrieve the value of. |
| On return, if this method returned true, contains the retrieved value. If this method returned false, contains the default value of |
T | The type of the variable to retrieve. |
| The name to associate with this variable. |
| The string to store. |
Property in Dialogue
Gets or sets the LineHandler that is called when a line is ready to be shown to the user.
Property in Dialogue
Gets or sets the NodeCompleteHandler that is called when a node is complete.
Property in Dialogue
Gets or sets the PrepareForLinesHandler that is called when the dialogue anticipates delivering some lines.
Property in Dialogue
Gets or sets the object that provides access to storing and retrieving the values of variables.
Delegate in Yarn
Inherits from System.MulticastDelegate
Represents the method that is called when the dialogue has reached its end, and no more code remains to be run.
LineHandler: Represents the method that is called when the Dialogue delivers a Line .
OptionsHandler: Represents the method that is called when the Dialogue delivers an OptionSet .
CommandHandler: Represents the method that is called when the Dialogue delivers a Command .
NodeStartHandler: Represents the method that is called when the Dialogue begins executing a node.
NodeCompleteHandler: Represents the method that is called when the Dialogue reaches the end of a node.
Property in FunctionType
Gets the parent of this type.
All types have Any as their ultimate parent type (except for Any itself.)
Property in FunctionType
Gets the list of the parameter types that this function is called with.
The length of this list also determines the number of parameters this function accepts (also known as the function's arity ).
The additional program to load. |
|
Method in Library
Registers a new function that returns a value, which can be called from a Yarn program.
Class in Yarn
Inherits from System.Object
A type that represents functions.
Functions have parameters and a return type, and can be called from script. Instances of this type are created when the host application registers new functions (such as through using the RegisterFunction(string,Delegate) methods or similar.)
program
program
The to use.
The name of the node that will be run. The node have been loaded by calling or .
Name | Description |
---|---|
Name | Description |
---|---|
Name | Description |
---|---|
Name | Description |
---|---|
Property in
Property in
Interface in
Name | Description |
---|
Property in
Method in
Name | Description |
---|
Method in
Name | Description |
---|
Method in
string
name
The name of the function.
System.Func<T1, T2, T3, T4, TResult>
implementation
The method to be invoked when the function is called.
TResult
The return type of the function.
TResult
The return type of the function.
T1
The type of the function's first argument.
T2
The type of the function's second argument.
T3
The type of the function's third argument.
T4
The type of the function's fourth argument.
Gets a more verbose description of this type.
Gets the collection of methods that are available on this type.
Gets the name of this type.
Gets the list of the parameter types that this function is called with.
Gets the parent of this type.
Gets the type of value that this function returns.
Gets a more verbose description of this type.
Gets the collection of methods that are available on this type.
Gets the name of this type.
Gets the parent of this type.
| The name to associate with this variable. |
| The number to store. |
| The name to associate with this variable. |
| The boolean value to store. |
Removes all variables from storage. |
Stores a |
Stores a |
Stores a |
Retrieves a value of type |
Method in IVariableStorage
Retrieves a value of type T
by name.
true
if a value named variableName
of type T
was retrieved; false
otherwise.
Method in Library
Returns a System.Delegate
with a given name.
The System.Delegate
.
Class in Yarn
Inherits from System.Object
A collection of functions that can be called from Yarn programs.
You do not create instances of this class yourself. The Dialogue class creates one of its own, which you can access via the Library property.
Dialogue: Co-ordinates the execution of Yarn programs.
Method in Library
Removes a function from the Library.
If no function with the given name is present in the Library, this method does nothing.
Method in Library
Registers a new function that returns a value, which can be called from a Yarn program.
Method in Library
Registers a new function that returns a value, which can be called from a Yarn program.
Method in Library
Registers a new function that returns a value, which can be called from a Yarn program.
Method in Library
Registers a new function that returns a value, which can be called from a Yarn program.
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 |
---|
Name | Description |
---|
Field in
Field in
Method in
Name | Description |
---|
Name | Description |
---|
string
variableName
The name of the variable to retrieve the value of.
T
result
On return, if this method returned true, contains the retrieved value. If this method returned false, contains the default value of T
(for example, 0
for float
values, null
for strings, and so on.)
T
The type of the variable to retrieve.
string
variableName
The name to associate with this variable.
string
stringValue
The string to store.
string
name
The name of the function to retrieve.
string
name
The name of the function to look for.
Removes a function from the Library.
Gets a value indicating whether this Library contains a function named name
.
Returns a System.Delegate
with a given name.
Loads functions from another Library .
Registers a new function that returns a value, which can be called from a Yarn program.
Registers a new function that returns a value, which can be called from a Yarn program.
Registers a new function that returns a value, which can be called from a Yarn program.
Registers a new function that returns a value, which can be called from a Yarn program.
Registers a new function that returns a value, which can be called from a Yarn program.
Registers a new function that returns a value, which can be called from a Yarn program.
Registers a new function that returns a value, which can be called from a Yarn program.
string
name
The name of the function to remove.
string
name
The name of the function.
System.Func<T1, T2, T3, TResult>
implementation
The method to be invoked when the function is called.
TResult
The return type of the function.
TResult
The return type of the function.
T1
The type of the function's first argument.
T2
The type of the function's second argument.
T3
The type of the function's third argument.
string
name
The name of the function.
System.Func<T1, T2, TResult>
implementation
The method to be invoked when the function is called.
TResult
The return type of the function.
TResult
The return type of the function.
T1
The type of the function's first argument.
T2
The type of the function's second argument.
string
name
The name of the function.
System.Func<T1, TResult>
implementation
The method to be invoked when the function is called.
TResult
The return type of the function.
TResult
The return type of the function.
T1
The type of the function's first argument.
Yarn.Library otherLibrary
The library to import functions from.
string
name
The name of the function.
System.Func<TResult>
implementation
The method to be invoked when the function is called.
TResult
The return type of the function.
| The name of the function. |
| The method to be invoked when the function is called. |
TResult | The return type of the function. |
| The name of the function. |
| The method to be invoked when the function is called. |
TResult | The return type of the function. |
TResult | The return type of the function. |
T1 | The type of the function's first argument. |
T2 | The type of the function's second argument. |
T3 | The type of the function's third argument. |
T4 | The type of the function's fourth argument. |
T5 | The type of the function's fifth argument. |
Method in
Name | Description |
---|
Delegate in
Represents a method that receives diagnostic messages and error information from a .
Name | Description |
---|
Delegate in
Represents the method that is called when the Dialogue delivers a .
Name | Description |
---|
: Represents the method that is called when the Dialogue delivers an .
: Represents the method that is called when the Dialogue delivers a .
: Represents the method that is called when the Dialogue begins executing a node.
: Represents the method that is called when the Dialogue reaches the end of a node.
: Represents the method that is called when the dialogue has reached its end, and no more code remains to be run.
Method in
Name | Description |
---|
Class in
A simple concrete implementation of that keeps all variables in memory.
Name | Description |
---|
Property in
| The name to associate with this variable. |
| The number to store. |
| The text that should be logged. |
| The name to associate with this variable. |
| The boolean value to store. |
Removes all variables from storage. |
Stores a |
Stores a |
Stores a |
Retrieves a value of type |
Struct in Yarn
Inherits from System.ValueType
A line of dialogue, sent from the Dialogue to the game.
When the game receives a Line, it should do the following things to prepare the line for presentation to the user.
Use the value in the ID field to look up the appropriate user-facing text in the string table.
Use ExpandSubstitutions(string,IList<string>) to replace all substitutions in the user-facing text.
Use ParseMarkup(string) to parse all markup in the line.
You do not create instances of this struct yourself. They are created by the Dialogue during program execution.
Dialogue.LineHandler: Gets or sets the LineHandler that is called when a line is ready to be shown to the user.
Gets a value indicating whether the player should be permitted to select this option.
If this value is false
, this option had a line condition on it that failed. The option will still be delivered to the game, but, depending on the needs of the game, the game may decide to not allow the player to select it, or not offer it to the player at all.
This is intended for situations where games wish to show options that the player _could_ have taken, if some other condition had been met (e.g. having enough "charisma" points).
line
The that has been delivered.
Name | Description |
---|---|
Name | Description |
---|---|
Name | Description |
---|---|
Property in
The list of instructions in this node.
A jump table, mapping the names of labels to positions in the instructions list.
The name of this node.
the entry in the program's string table that contains the original text of this node; null if this is not available
The tags associated with this node.
The string ID for this line.
The values that should be inserted into the user-facing text before delivery.
Delegate in Yarn
Inherits from System.MulticastDelegate
Represents the method that is called when the Dialogue begins executing a node.
LineHandler: Represents the method that is called when the Dialogue delivers a Line .
OptionsHandler: Represents the method that is called when the Dialogue delivers an OptionSet .
CommandHandler: Represents the method that is called when the Dialogue delivers a Command .
NodeCompleteHandler: Represents the method that is called when the Dialogue reaches the end of a node.
DialogueCompleteHandler: Represents the method that is called when the dialogue has reached its end, and no more code remains to be run.
Name | Description |
---|---|
Struct in
A set of s, sent from the to the game.
You do not create instances of this struct yourself. They are created by the during program execution.
Name | Description |
---|
Name | Description |
---|
: Gets or sets the that is called when a set of options are ready to be shown to the user.
Property in
Property in
string
startedNodeName
The name of the node.
Property in Option
Gets the identifying number for this option.
When the user selects this option, this value should be used as the parameter for SetSelectedOption(int) .
An option to be presented to the user. |
Gets the s that should be presented to the user.
Delegate in Yarn
Inherits from System.MulticastDelegate
Represents the method that is called when the Dialogue reaches the end of a node.
This method may be called multiple times over the course of code execution. A node being complete does not necessarily represent the end of the conversation.
LineHandler: Represents the method that is called when the Dialogue delivers a Line .
OptionsHandler: Represents the method that is called when the Dialogue delivers an OptionSet .
CommandHandler: Represents the method that is called when the Dialogue delivers a Command .
NodeStartHandler: Represents the method that is called when the Dialogue begins executing a node.
DialogueCompleteHandler: Represents the method that is called when the dialogue has reached its end, and no more code remains to be run.
Name | Description |
---|---|
string
completedNodeName
The name of the node.
Struct in OptionSet
Inherits from System.ValueType
An option to be presented to the user.
Name | Description |
---|---|
Gets the name of the node that will be run if this option is selected.
Gets the identifying number for this option.
Gets a value indicating whether the player should be permitted to select this option.
Gets the Line that should be presented to the user for this option.
Property in
Delegate in
Represents the method that is called when the Dialogue delivers an .
Name | Description |
---|
: Represents the method that is called when the Dialogue delivers a .
: Represents the method that is called when the Dialogue delivers a .
: Represents the method that is called when the Dialogue begins executing a node.
: Represents the method that is called when the Dialogue reaches the end of a node.
: Represents the method that is called when the dialogue has reached its end, and no more code remains to be run.
options
The that has been delivered.