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.
-
Use the value in the
ID
field to look up the appropriate user-facing text in the string table. -
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 ofSubstitutions[0]
, “{1}
” withSubstitutions[1]
, and so on. -
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
Dialogue.LineHandler
: Represents the method that is called when the Dialogue delivers aLine
.
Source
Defined in YarnSpinner/Dialogue.cs, line 62.