Pardon our dust! Docs for Yarn Spinner for Unity 3.2 and Yarn Spinner for Godot C# are on docs.yarnspinner.dev (the old docs site). Docs for Yarn Spinner for Unity 3.3 (pre-release, out ASAP), Yarn Spinner for Godot GDScript and Yarn Spinner for Unreal Engine (work in progress) are on /docs/ (the new docs site).

Definitions

Definitions represent external actions that are part of the Project and are used in different ways by different parts of Yarn Spinner. These are primarily constructed by providing the YSLS json file but you can manually create one for tests.
public class Definitions

Inherits from System.Object

#Constructors

#Definitions(ReadOnlyMemory<byte>, int)

Creates a new definition from the provided json source
public Definitions(ReadOnlyMemory<byte> source, int projectFileVersion)

Parameters

  • sourceSystem.ReadOnlyMemory<byte>
    The source JSON of the definitions
  • projectFileVersionint
    The version number of the project file

#Definitions(string, int)

Creates a new definition from the provided json source
public Definitions(string source, int projectFileVersion)

Parameters

  • sourcestring
    The source JSON of the definitions
  • projectFileVersionint
    The version number of the project file

#Fields

#commands

Contains all the commands externally provided by the definitions file. May be empty
public List<Yarn.Shared.Action> commands;

Type List

#functions

Contains all the different function definitions externally provided by the definitions file. May be empty
public List<Declaration> functions;

Type List

Generated from Yarn Spinner for Unity 3.3.