ILineTagGenerator.LineTagContext
Contains contextual information needed for generating a line tag.
public struct LineTagContext
;Inherits from System.ValueType
#Fields
#LineID
The line id of the current line, will only have a value for lines that are already tagged.
public string? LineID;Type String
#Properties
#Line
The current line parse statement.
public YarnSpinnerParser.Line_statementContext Line { get; internal set; }Type Line_statementContext
This gives your custom taggers access to the same information we use internally, unlikely you'll need this but it exists just in case.
A lot of the information contained within the context is already derived from this.
#LineNumber
The line number inside the file for this specifc line of dialogue.
This matches the line number as seen inside an editor.
public readonly int LineNumber { get }Type Int32
While this can be used as part of your line id generation this is mostly intended to be used for error messaging, as line numbers are very rarely stable.
It is highly unlikely for this value to remain the same across multiple tagging runs or edits of Yarn files.
Meaning your tagger might have unexpected behaviour across multiple invocations if you are relying on this value.
#LineText
The text of the line of dialogue
public string LineText { get; }Type String
#SourceFileName
The name of the file currently being processed.
public string? SourceFileName { get; internal set; }Type String
If the tagging is requested as part of string based compilation instead of a file compilation this value will always be <input>.
Generated from Yarn Spinner for Unity 3.3.