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

Line

A line of dialogue, sent from the Dialogue to the game.
public struct Line

Inherits from System.ValueType

When the game receives a Line, it should do the following things to prepare the line for presentation to the user.

  1. Use the value in the ID field to look up the appropriate user-facing text in the string table.
  2. Use ExpandSubstitutions(string,IList<string>) to replace all substitutions in the user-facing text.
  3. Use Yarn.Markup.LineParser.ParseString(System.String,System.String,System.Boolean,System.Boolean,System.Boolean) to parse all markup in the line.

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

See also

#Constructors

#Line(string, string[])

Initialises a new instance of the Line struct.
public Line(string stringID, string[] substitutions)

Parameters

  • stringIDstring
    The unique line ID for this content.
  • substitutionsstring[]
    The list of values that should be substituted into the final line.

#Properties

#ID

The string ID for this line.
public string ID { get; }

Type String

#Substitutions

The values that should be inserted into the user-facing text before delivery.
public string[] Substitutions { get; }

Generated from Yarn Spinner for Unity 3.3.