All pages
Powered by GitBook
Couldn't generate the PDF for 1084 pages, generation stopped at 100.
Extend with 50 more pages.
1 of 100

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...

Yarn.Utility Namespace

Summary

Contains utility classes used by Yarn Spinner.

Classes

Name
Description

CRC32

Provides a method for generating CRC32 hashes of strings.

Value

Property in ConstantTypeProperty

Summary

Gets the value that is stored in this property.

public IConvertible Value { get; }

GetStringIDForNode(string)

Method in Dialogue

Summary

Returns the string ID that contains the original, uncompiled source text for a node.

Remarks

A node's source text will only be present in the string table if its tags header contains rawText.

Because the Dialogue 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.

Parameters

Name
Description

string nodeName

The name of the node.

Returns

The string ID.

NodeExists(string)

Method in Dialogue

Summary

Gets a value indicating whether a specified node exists in the Program.

Parameters

Name
Description

string nodeName

The name of the node.

Returns

true if a node named nodeName exists in the Program, false otherwise.

UnloadAll()

Method in Dialogue

Summary

Unloads all nodes from the Dialogue.

public void UnloadAll()

ContentSaliencyStrategy

Property in Dialogue

Summary

Gets or sets the content saliency strategy used by this Dialogue .

public Saliency.IContentSaliencyStrategy ContentSaliencyStrategy { get; set; }

Remarks

A content saliency strategy is a class that implements IContentSaliencyStrategy and selects the most appropriate content in a line group, or any other situation where content saliency is relevant.

public string? GetStringIDForNode(string nodeName)
public bool NodeExists(string nodeName)

SetNode(string)

Method in Dialogue

Summary

Prepares the Dialogue that the user intends to start running a node.

Remarks

After this method is called, you call Continue() to start executing it.

If PrepareForLinesHandler 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.

Parameters

Name
Description

string startNode

The name of the node that will be run. The node have been loaded by calling SetProgram(Program) .

GetTagsForNode(string)

Method in Dialogue

This method is obsolete and may be removed from a future version of Yarn Spinner: Use GetHeaderValue(nodeName, "tags"), and split the result by spaces.

Summary

Returns the tags for the node nodeName .

Remarks

The tags for a node are defined by setting the tags header in the node's source code. This header must be a space-separated list.

Parameters

Name
Description

string nodeName

The name of the node.

Returns

The node's tags, or null if the node is not present in the Program.

CRC32

Class in Yarn.Utility

Inherits from System.Object

Summary

Provides a method for generating CRC32 hashes of strings.

Methods

Name
Description

GetChecksum(byte[])

Computes a CRC32 checksum from the given bytes.

GetChecksum(string)

Computes a CRC32 checksum from the given string.

GetChecksumString(string)

Gets the CRC-32 hash of s as a string containing 8 lowercase hexadecimal characters.

CommandHandler

Delegate in Yarn

Inherits from System.MulticastDelegate

Summary

Represents the method that is called when the Dialogue delivers a Command .

Parameters

Name
Description

Yarn.Command command

The Command that has been delivered.

See Also

  • 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.

SetProgram(Program)

Method in Dialogue

Summary

Loads all nodes from the provided Program .

Remarks

This method replaces any existing nodes have been loaded.

Parameters

Name
Description

Yarn.Program program

The Program to use.

Dialogue(Yarn.IVariableStorage)

Constructor in Dialogue

Summary

Initializes a new instance of the Dialogue class.

Parameters

Name
Description

Yarn.IVariableStorage variableStorage

The IVariableStorage that this Dialogue should use.

GetSaliencyOptionsForNodeGroup(string)

Method in Dialogue

Summary

Queries the Dialogue for what content could possibly run if the node group nodeGroup was run.

Remarks

This method evaluates all nodes in the given node group, and returns a ContentSaliencyOption object for each node. This object contains the current number of passing and failing 'when' clauses on the node, as well as the complexity score for that node. This is the same information that's passed to a IContentSaliencyStrategy object's QueryBestContent(IEnumerable<ContentSaliencyOption>) method. This method is read-only, and calling it will not modify any variable state.

Note that this method does not filter its output, and may include content options whose FailingConditionValueCount is greater than zero. It's up to the caller of this function to filter out these options if they're not wanted.

This method can be used to see if any content will appear when a given node group is run. If the collection returned by this method is empty, then running this node group will not result in any content. This can be used, for example, to decide whether to show a 'character can be spoken to' indicator. You can also examine the individal ContentSaliencyOption objects to see if any content is available that passes a filter, such as whether content might appear that has a user-defined 'plot critical' tag.

Parameters

Name
Description

string nodeGroup

The name of the node group to get available content for.

Returns

A collection of ContentSaliencyOption objects that may appear if and when the node group nodeGroup is run.

LineHandler

Property in Dialogue

Summary

Gets or sets the LineHandler that is called when a line is ready to be shown to the user.

public LineHandler? LineHandler { get; set; }

LogDebugMessage

Property in Dialogue

Summary

Invoked when the Dialogue needs to report debugging information.

public Logger? LogDebugMessage { get; set; }

NodeCompleteHandler

Property in Dialogue

Summary

Gets or sets the NodeCompleteHandler that is called when a node is complete.

public NodeCompleteHandler? NodeCompleteHandler { get; set; }

NodeNames

Property in Dialogue

Summary

Gets the names of the nodes in the currently loaded Program.

public IEnumerable<string> NodeNames { get; }

Remarks

If no program is currently loaded, an empty collection is returned.

DialogueException

Class in Yarn

Inherits from System.Exception

Summary

An exception that is thrown by Dialogue when there is an error in executing a Program .

public class DialogueException : System.Exception

EnumBase()

Constructor in EnumBase

Summary

Initialises a new instance of the EnumBase class.

public EnumBase()

Parent

Property in EnumBase

Summary

Gets the parent of this type.

public override IType? Parent { get }

EnumCases

Property in EnumType

Summary

Gets the collection of enum cases in this enum.

public IEnumerable<KeyValuePair<string, ConstantTypeProperty>> EnumCases { get; }

Name

Property in EnumType

Summary

Gets the name of this type.

public override string Name { get }

Parent

Property in EnumType

Summary

Gets the parent of this type.

public override IType Parent { get }

ReturnType

Property in FunctionType

Summary

Gets the type of value that this function returns.

public IType ReturnType { get; internal set; }

VariadicParameterType

Property in FunctionType

Summary

Gets the type of value that this type of function accepts as a variadic parameter.

public IType? VariadicParameterType { get; internal set; }

Remarks

This value is null if this type of function does not accept variadic parameters.

CalculateSize()

Method in Header

Summary

public int CalculateSize()

Equals(Header)

Method in Header

Summary

public bool Equals(Header other)

Parameters

Name
Description

Yarn.Header other

Clone()

Method in Header

Summary

public Header Clone()

GetHashCode()

Method in Header

Summary

public override int GetHashCode()

Header()

Constructor in Header

Summary

public Header()

Parser

Property in Header

Summary

public static pb::MessageParser<Header> Parser { get; }

KeyFieldNumber

Field in Header

Summary

Field number for the "key" field.

public const int KeyFieldNumber = 1;

Parent

Property in IType

Summary

Gets the parent of this type.

IType? Parent { get; }

Remarks

All types have Any as their ultimate parent type (except for Any itself.)

public void SetNode(string startNode = DefaultStartNodeName)
public IEnumerable<string> GetTagsForNode(string nodeName)
public static class CRC32
public delegate void CommandHandler(Command command);
public void SetProgram(Program program)
public Dialogue(Yarn.IVariableStorage variableStorage)
public IEnumerable<Saliency.ContentSaliencyOption> GetSaliencyOptionsForNodeGroup(string nodeGroup)

EnumType(string,string,TypeBase)

Constructor in EnumType

Summary

Initializes a new instance of the EnumType class that represents an enum type. This type has no methods of its own, and is a subtype of Any .

public EnumType(string name, string description, TypeBase rawType)

Parameters

Name
Description

string name

The name of this method.

string description

A string that describes this method.

rawType

ParseMarkup(string,string)

Method in IMarkupParser

Summary

Parses a string into markup, given a locale.

public MarkupParseResult ParseMarkup(string rawText, string localeCode);

Parameters

Name
Description

string rawText

The text to parse.

string localeCode

MergeFrom(Header)

Method in Header

Summary

public void MergeFrom(Header other)

Parameters

Name
Description

other

IMarkupParser

Interface in Yarn

Summary

Contains methods for parsing raw text into a MarkupParseResult .

public interface IMarkupParser

Methods

Name
Description

Parses a string into markup, given a locale.

EnumBase

Class in

Inherits from

The base type for all enumeration types.

Name
Description

ToString()

Method in

The locale to use when parsing the text.

Yarn.TypeBase
Yarn.Header
ParseMarkup(string,string)
public override string ToString()

Summary

Header
Name
Description
public class EnumBase : TypeBase

Initialises a new instance of the class.

Summary

Constructors

Properties

Yarn
TypeBase

Gets a string describing this type.

Gets the name of this type.

Gets the parent of this type.

EnumBase()
EnumBase
Description
Name
Parent

Dialogue

Class in Yarn

Inherits from System.Object

Summary

Co-ordinates the execution of Yarn programs.

public class Dialogue : ISmartVariableEvaluator

Constructors

Name
Description

Initializes a new instance of the class.

Fields

Name
Description
Name
Description
Name
Description

The node that execution will start from.

Starts, or continues, execution of the current Program.

Gets the collection of headers present on the node named nodeName .

Gets or sets the that is called when a command is to be delivered to the game.

Gets or sets the content saliency strategy used by this .

Methods

Properties

Dialogue(Yarn.IVariableStorage)
Dialogue

Gets the value of the header named headerName on the node named nodeName , or null if the header can't be found.

Queries the for what content could possibly run if the node group nodeGroup was run.

Returns the string ID that contains the original, uncompiled source text for a node.

Returns the tags for the node nodeName .

Returns if the node group has any potential nodes to be run based on the current salient selector.

Gets a value indicating whether nodeName is the name of a valid node group in the program.

Gets a value indicating whether a specified node exists in the Program.

Prepares the that the user intends to start running a node.

Loads all nodes from the provided .

Signals to the that the user has selected a specified .

Immediately stops the .

Evaluate the value of a smart variable named name .

Unloads all nodes from the Dialogue.

Gets the name of the node that this Dialogue is currently executing.

Gets or sets the that is called when the dialogue reaches its end.

Gets a value indicating whether the Dialogue is currently executing Yarn instructions.

Gets the that this Dialogue uses to locate functions.

Gets or sets the 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 that is called when a node is complete.

Gets the names of the nodes in the currently loaded Program.

Gets or sets the that is called when a node is started.

Gets or sets the that is called when a set of options are ready to be shown to the user.

Gets or sets the 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.

DefaultStartNodeName
Continue()
GetHeaders(string)
GetHeaderValue(string,string)
CommandHandler
CommandHandler
ContentSaliencyStrategy
Dialogue
CurrentNode
GetSaliencyOptionsForNodeGroup(string)
Dialogue
GetStringIDForNode(string)
GetTagsForNode(string)
HasSalientContent(string)
IsNodeGroup(string)
NodeExists(string)
SetNode(string)
Dialogue
SetProgram(Program)
Program
SetSelectedOption(int)
Dialogue
Option
Stop()
Dialogue
TryGetSmartVariable(string,T)
UnloadAll()
DialogueCompleteHandler
DialogueCompleteHandler
IsActive
Library
Library
LineHandler
LineHandler
LogDebugMessage
LogErrorMessage
NodeCompleteHandler
NodeCompleteHandler
NodeNames
NodeStartHandler
NodeStartHandler
OptionsHandler
OptionsHandler
PrepareForLinesHandler
PrepareForLinesHandler
VariableStorage

MergeFrom(pb::CodedInputStream)

Method in

Name
Description
public void MergeFrom(pb::CodedInputStream input)

Google.Protobuf.CodedInputStream input

Summary

Parameters

Header

IsNodeGroup(string)

Method in Dialogue

Summary

Gets a value indicating whether nodeName is the name of a valid node group in the program.

Parameters

Name
Description

string nodeName

The name of the node group to check.

Returns

true if nodeName is the name of a node group; false otherwise.

public bool IsNodeGroup(string nodeName)

Value

Property in

The value of the header.

public string Value { get; set; }

Summary

Header

SetSelectedOption(int)

Method in Dialogue

Summary

Signals to the Dialogue that the user has selected a specified Option .

public void SetSelectedOption(int selectedOptionID)

Remarks

After the Dialogue delivers an OptionSet, this method must be called before Continue() is called.

The ID number that should be passed as the parameter to this method should be the ID field in the Option that represents the user's selection.

Parameters

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.

int selectedOptionID

The ID number of the Option that the user selected.

See Also

OptionsHandler
OptionSet
OptionSet
Option
Dialogue
Dialogue.Continue()

Equals(object)

Method in

Name
Description
public override bool Equals(object other)

object other

Summary

Parameters

Header

Yarn Namespace

Summary

Contains classes for working with compiled Yarn programs.

Classes

Name
Description

Represents a property that belongs to a type and contains a read-only value.

Name
Description
Name
Description
Name
Description
Name
Description
Name
Description

Co-ordinates the execution of Yarn programs.

An exception that is thrown by when there is an error in executing a .

The base type for all enumeration types.

A type that represents enumerations.

A type that represents a function.

A collection of functions that can be called from Yarn programs.

A simple concrete implementation of that keeps all variables in memory.

A node of Yarn script, contained within a , and containing Yarn.Instruction s.

A compiled Yarn program.

Provides the base class for all concrete types.

Contains the built-in types available in the Yarn language.

Represents the method that is called when the Dialogue delivers a .

Represents the method that is called when the dialogue has reached its end, and no more code remains to be run.

Represents different kinds of variables that can be fetched from a using .

Contains methods for parsing raw text into a .

Contains methods for evaluating the value of smart variables

Contains classes for compiling Yarn code.

Contains classes for working with markup in Yarn lines.

A command, sent from the to the game.

A line of dialogue, sent from the to the game.

Delegates

Enums

Interfaces

Namespaces

Structs

ConstantTypeProperty
Dialogue

Represents the method that is called when the Dialogue delivers a .

Represents a method that receives diagnostic messages and error information from 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 begins executing a node.

Represents the method that is called when the Dialogue delivers an .

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 properties used to work with members of a type.

Provides a mechanism for retrieving values.

Provides a mechanism for storing values.

Represents a read-only value in the Yarn Spinner virtual machine.

Contains classes for choosing the most relevant content out of a set of possible options.

Contains classes for working with Yarn Spinner in the Unity game engine.

Contains utility classes used by Yarn Spinner.

A set of s, sent from the to the game.

DialogueException
Dialogue
Program
EnumBase
EnumType
FunctionType
Header
Library
MemoryVariableStore
IVariableStorage
Node
Program
Program
TypeBase
Types
CommandHandler
Command
DialogueCompleteHandler
LineHandler
VariableKind
Dialogue
TryGetValue<T>(string,T?)
IMarkupParser
MarkupParseResult
ISmartVariableEvaluator
IType
Yarn.Compiler
Yarn.Markup
Yarn.Saliency
Command
Dialogue
Line
Dialogue
OptionSet

CommandHandler

Property in

Gets or sets the that is called when a command is to be delivered to the game.

Line
Logger
Dialogue
NodeCompleteHandler
NodeStartHandler
OptionsHandler
OptionSet
PrepareForLinesHandler
ITypeMember
IVariableAccess
IVariableStorage
IYarnValue
Yarn.Unity
Yarn.Utility
Option
Dialogue
public CommandHandler? CommandHandler { get; set; }

Summary

Dialogue
CommandHandler

NodeStartHandler

Property in

Gets or sets the that is called when a node is started.

Stop()

Method in

Immediately stops the .

HasSalientContent(string)

Method in

Returns if the node group has any potential nodes to be run based on the current salient selector.

Name
Description

True if there is any salient content for the requested node group

public NodeStartHandler? NodeStartHandler { get; set; }

Summary

Dialogue
NodeStartHandler
public void Stop()

Summary

Dialogue
Dialogue

string nodeGroup

The name of the node group.

Summary

Parameters

Returns

Dialogue
public bool HasSalientContent(string nodeGroup)

Continue()

Method in Dialogue

Summary

Starts, or continues, execution of the current Program.

public void Continue()

Remarks

This method repeatedly executes instructions until one of the following conditions is encountered:

  • The LineHandler or CommandHandler is called. After calling either of these handlers, the Dialogue will wait until Continue() is called. Continue may be called from inside the LineHandler or CommandHandler, or may be called at any future time.

  • The OptionsHandler is called. When this occurs, the Dialogue is waiting for the user to specify which of the options has been selected, and SetSelectedOption(int) must be called before Continue() is called again.)

  • The Program reaches its end. When this occurs, must be called before is called again.

  • An error occurs while executing the Program.

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.

  • See Also

    SetNode(string)
    Continue()
    Dialogue
    LineHandler
    Line
    OptionsHandler
    OptionSet
    CommandHandler
    Command
    NodeCompleteHandler
    DialogueCompleteHandler

    Parent

    Property in

    Gets the parent of this type.

    All types have as their ultimate parent type (except for itself.)

    Descriptor

    Property in

    public IType Parent { get; }

    Summary

    Remarks

    FunctionType
    Any
    Any
    public static pbr::MessageDescriptor Descriptor { get; }

    Summary

    Header

    GetChecksumString(string)

    Method in CRC32

    Summary

    Gets the CRC-32 hash of s as a string containing 8 lowercase hexadecimal characters.

    public static string GetChecksumString(string s)

    Remarks

    This method converts the string to a UTF-8 encoding, and then computes a CRC32 checksum from those bytes.

    Parameters

    Name
    Description

    string s

    The string containing the checksum.

    The string to get the checksum of.

    Returns

    GetHeaders(string)

    Method in

    Gets the collection of headers present on the node named nodeName .

    Name
    Description

    A collection of key-values pairs, each one representing a header on the node.

    string nodeName

    The name of the node to get headers for.

    Summary

    Parameters

    Returns

    Dialogue
    public IEnumerable<KeyValuePair<string, string>> GetHeaders(string nodeName)

    VariableStorage

    Property in

    Gets or sets the object that provides access to storing and retrieving the values of variables.

    public IVariableStorage VariableStorage { get; set; }

    Summary

    Dialogue

    DefaultStartNodeName

    Field in

    The node that execution will start from.

    public const string DefaultStartNodeName = "Start";

    Summary

    Dialogue

    C#

    Name

    Property in IType

    Summary

    Gets the name of this type.

    string Name { get; }

    DialogueCompleteHandler

    Delegate in Yarn

    Inherits from System.MulticastDelegate

    Summary

    Represents the method that is called when the dialogue has reached its end, and no more code remains to be run.

    public delegate void DialogueCompleteHandler();

    See Also

    • 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 .

    • : 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.

    CommandHandler
    Command
    NodeStartHandler
    NodeCompleteHandler

    Name

    Property in FunctionType

    Summary

    Gets the name of this type.

    public string Name { get; }

    Header

    Class in Yarn

    Inherits from System.Object

    Summary

    public sealed class Header : pb::IMessage<Header>
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    , pb::IBufferMessage

    Constructors

    Name
    Description

    Name
    Description
    Name
    Description
    Name
    Description

    EnumType

    Class in Yarn

    Inherits from TypeBase

    Summary

    A type that represents enumerations.

    public class EnumType : TypeBase

    Constructors

    Name
    Description

    Initializes a new instance of the class that represents an enum type. This type has no methods of its own, and is a subtype of .

    Properties

    Name
    Description

    Field number for the "key" field.

    Field number for the "value" field.

    The name of the header.

    Fields

    Methods

    Properties

    Header()

    Gets a string describing this type.

    Gets the collection of enum cases in this enum.

    Gets the name of this type.

    EnumType(string,string,TypeBase)
    EnumType
    Any

    The value of the header.

    Header(Header)
    KeyFieldNumber
    ValueFieldNumber
    CalculateSize()
    Clone()
    Equals(object)
    Descriptor
    Key
    Parser

    Gets the parent of this type.

    Gets the type of this enum's members.

    Description
    EnumCases
    Name
    Equals(Header)
    GetHashCode()
    MergeFrom(pb::CodedInputStream)
    MergeFrom(Header)
    ToString()
    WriteTo(pb::CodedOutputStream)
    Value
    Parent
    RawType

    TypeMembers

    Property in

    Gets the collection of type information for this type's type members.

    public IReadOnlyDictionary<string, ITypeMember> TypeMembers { get }

    Summary

    FunctionType

    Name

    Property in EnumBase

    Summary

    Gets the name of this type.

    public override string Name { get }

    ConstantTypeProperty

    Class in Yarn

    Inherits from System.Object

    Summary

    Represents a property that belongs to a type and contains a read-only value.

    public class ConstantTypeProperty : ITypeMember

    Remarks

    This kind of type member is useful for constant properties, like enum cases.

    Properties

    Name
    Description

    Description

    Property in

    Gets a more verbose description of this type.

    string Description { get; }

    Summary

    IType

    Gets a string describing this property.

    Gets the type of this property.

    Gets the value that is stored in this property.

    Description
    Type
    Value

    LogErrorMessage

    Property in

    Invoked when the Dialogue needs to report an error.

    public Logger? LogErrorMessage { get; set; }

    Summary

    Dialogue

    Description

    Property in

    Gets a string describing this property.

    public string Description { get; }

    Summary

    ConstantTypeProperty

    GetChecksum(byte[])

    Method in CRC32

    Summary

    Computes a CRC32 checksum from the given bytes.

    Parameters

    Name
    Description

    byte[] bytes

    The bytes to generate a checksum for.

    Returns

    A CRC32 checksum derived from bytes .

    public static uint GetChecksum(byte[] bytes)

    IType

    Interface in

    Defines properties that describe a type in the Yarn language.

    Name
    Description
    public interface IType

    Gets a more verbose description of this type.

    Summary

    Properties

    Yarn

    Gets the name of this type.

    Gets the parent of this type.

    Gets the collection of type information for this type's type members.

    Description
    Name
    Parent
    TypeMembers

    Description

    Property in

    Gets a string describing this type.

    public override string Description { get }

    Summary

    EnumBase

    Equals(IType)

    Method in

    Name
    Description
    public bool Equals(IType other)

    other

    Summary

    Parameters

    FunctionType
    Yarn.IType

    ISmartVariableEvaluator

    Interface in Yarn

    Summary

    Contains methods for evaluating the value of smart variables

    public interface ISmartVariableEvaluator

    Methods

    Name
    Description

    Evaluate the value of a smart variable named name .

    GetHeaderValue(string,string)

    Method in Dialogue

    Summary

    Gets the value of the header named headerName on the node named nodeName , or null if the header can't be found.

    public string? GetHeaderValue(string nodeName, string headerName)

    Remarks

    If the node has more than one header named headerName , the first one is used.

    Parameters

    Name
    Description

    The value of the first header on the node with the specified header value.

    string nodeName

    The name of the node.

    string headerName

    The name of the header.

    Returns

    TryGetSmartVariable(string,T)

    DialogueCompleteHandler

    Property in Dialogue

    Summary

    Gets or sets the DialogueCompleteHandler that is called when the dialogue reaches its end.

    public DialogueCompleteHandler? DialogueCompleteHandler { get; set; }

    GetParameterAt(int)

    Method in FunctionType

    Summary

    Gets the type of the parameter at the given index.

    public IType GetParameterAt(int index)

    Parameters

    Name
    Description

    int index

    The index of the parameter to get the type for.

    Returns

    The type of the parameter. If index is beyond the length of , and is not null , is returned.

    Parameters
    VariadicParameterType
    VariadicParameterType

    TryGetSmartVariable<T>(string,T)

    Method in ISmartVariableEvaluator

    Summary

    Evaluate the value of a smart variable named name .

    bool TryGetSmartVariable<T>(string name, out T result);

    Parameters

    Name
    Description

    string name

    The name of the variable.

    Name
    Description

    true if the smart variable was evaluated, false otherwise.

    T result

    On return, contains the returned value of the smart variable, or the default value of T if a smart variable named name could not be found or its value could not be returned as type T .

    T

    The type of the returned value.

    Type Parameters

    Returns

    Text

    Property in

    Gets the text of the command.

    public string Text { get; private set; }

    Summary

    Command

    TypeMembers

    Property in

    Gets the collection of type information for this type's type members.

    System.Collections.Generic.IReadOnlyDictionary<string, ITypeMember> TypeMembers { get; }

    Summary

    IType

    Header(Header)

    Constructor in

    Name
    Description
    public Header(Header other)

    other

    Summary

    Parameters

    Header
    Yarn.Header

    FunctionType(IType,IType[])

    Constructor in FunctionType

    Summary

    Initialises a new instances of the FunctionType class.

    public FunctionType(IType returnType, params IType[] parameterTypes)

    Parameters

    Name
    Description

    returnType

    The type of the value that this type of function returns.

    parameterTypes

    The types of the parameters that this type of function accepts.

    Yarn.IType
    Yarn.IType[]

    PrepareForLinesHandler

    Property in

    Gets or sets the that is called when the dialogue anticipates delivering some lines.

    public PrepareForLinesHandler? PrepareForLinesHandler { get; set; }

    Summary

    Dialogue
    PrepareForLinesHandler

    ValueFieldNumber

    Field in

    Field number for the "value" field.

    public const int ValueFieldNumber = 2;

    Summary

    Header

    Key

    Property in

    The name of the header.

    public string Key { get; set; }

    Summary

    Header

    TryGetSmartVariable<T>(string,T)

    Method in Dialogue

    Summary

    Evaluate the value of a smart variable named name .

    public bool TryGetSmartVariable<T>(string name, out T result)

    Parameters

    Name
    Description

    string name

    The name of the variable.

    Name
    Description

    true if the smart variable was evaluated, false otherwise.

    T result

    On return, contains the returned value of the smart variable, or the default value of T if a smart variable named name could not be found or its value could not be returned as type T .

    T

    The type of the returned value.

    Type Parameters

    Returns

    ToString()

    Method in

    public override string ToString();

    Summary

    FunctionType

    Library

    Property in

    Gets the that this Dialogue uses to locate functions.

    When the Dialogue is constructed, the Library is initialized with the built-in operators like + , - , and so on.

    public Library Library { get; internal set; }

    Summary

    Remarks

    Dialogue
    Library

    Description

    Property in

    Gets a string describing this type.

    public override string Description { get }

    Summary

    EnumType

    IsActive

    Property in

    Gets a value indicating whether the Dialogue is currently executing Yarn instructions.

    public bool IsActive { get }

    Summary

    Dialogue

    RawType

    Property in

    Gets the type of this enum's members.

    public TypeBase RawType { get }

    Summary

    EnumType

    Description

    Property in

    Gets a more verbose description of this type.

    public string Description { get; set; }

    Summary

    FunctionType

    WriteTo(pb::CodedOutputStream)

    Method in

    Name
    Description
    public void WriteTo(pb::CodedOutputStream output)

    Google.Protobuf.CodedOutputStream output

    Summary

    Parameters

    Header

    Parameters

    Property in

    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 ).

    public List<IType> Parameters { get; }

    Summary

    Remarks

    FunctionType

    GetChecksum(string)

    Method in CRC32

    Summary

    Computes a CRC32 checksum from the given string.

    Remarks

    This method converts the string to a UTF-8 encoding, and then computes a CRC32 checksum from those bytes.

    Parameters

    Name
    Description

    string s

    The string to generate a checksum for.

    Returns

    A CRC32 checksum derived from s .

    public static uint GetChecksum(string s)

    Command

    Struct in Yarn

    Inherits from System.ValueType

    Summary

    A command, sent from the Dialogue to the game.

    public struct Command

    Remarks

    You do not create instances of this struct yourself. They are created by the Dialogue during program execution.

    Properties

    Name
    Description
    • : Gets or sets the that is called when a command is to be delivered to the game.

    Gets the text of the command.

    See Also

    Dialogue.CommandHandler
    CommandHandler
    Text

    CurrentNode

    Property in

    Gets the name of the node that this Dialogue is currently executing.

    If has never been called, this value will be null .

    public string? CurrentNode { get; }

    Summary

    Remarks

    Dialogue
    Continue()

    FunctionType

    Class in Yarn

    Inherits from System.Object

    Summary

    A type that represents a function.

    public class FunctionType : IType, IEquatable<IType>

    Remarks

    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.)

    Constructors

    Name
    Description
    Name
    Description
    Name
    Description

    Initialises a new instances of the class.

    Gets the type of the parameter at the given index.

    Gets a more verbose description of this type.

    Gets the name of this type.

    Methods

    Properties

    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 the collection of type information for this type's type members.

    Gets the type of value that this type of function accepts as a variadic parameter.

    FunctionType(IType,IType[])
    FunctionType
    Equals(IType)
    GetParameterAt(int)
    ToString()
    Description
    Name
    Parameters
    Parent
    ReturnType
    TypeMembers
    VariadicParameterType

    OptionsHandler

    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.

    public OptionsHandler? OptionsHandler { get; set; }

    Summary

    Remarks

    Dialogue
    OptionsHandler
    OptionSet
    Continue()
    SetSelectedOption(int)
    Option
    SetSelectedOption(int)

    Type

    Property in

    Gets the type of this property.

    public IType Type { get; }

    Summary

    ConstantTypeProperty