This site is for Yarn Spinner v1, and won't be updated. Go to the current site.

Line Struct

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

public struct Line

Remarks

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. For each of the entries in the Substitutions field, replace the corresponding placeholder with the entry. That is, the text “{0}” should be replaced with the value of Substitutions[0], “{1}” with Substitutions[1], and so on.

  3. Use ExpandFormatFunctions(String, String) to expand all format functions in the line.

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

Fields

Name Description
ID The string ID for this line.
Substitutions The values that should be inserted into the user-facing text before delivery.
Text Obsolete: The text of the line.

See Also

Source

Defined in YarnSpinner/Dialogue.cs, line 62.