All pages
Powered by GitBook
1 of 11

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

InvalidLine

Field in LocalizedLine

Summary

A LocalizedLine object that represents content not being found.

public static readonly LocalizedLine InvalidLine = new LocalizedLine{Asset = null, Metadata = System.Array.Empty<string>(), RawText = "!! ERROR: Missing line!", Substitutions = System.Array.Empty<string>(), TextID = "<missing>", Text = new Markup.MarkupParseResult("!! ERROR: Missing line!", new System.Collections.Generic.List<Markup.MarkupAttribute>())};

Metadata

Field in LocalizedLine

Summary

Any metadata associated with this line.

public string[] Metadata = System.Array.Empty<string>();

RawText

Field in LocalizedLine

Summary

DialogueLine's text

public string? RawText;

Source

Field in LocalizedLine

Summary

The object that created this line. Most of the time will be the DialogueRunner that passed the presenter the line.

public object? Source;

Remarks

This exists for situations where you need the dialogue runner (or your custom equivalent) to send back messages. In particular this is used by the VoiceOverPresenter to get a reference to the dialogue runner to advance lines after playback is finished without needing a specific reference. Allowing the presenter to be reused across multiple runners.

Substitutions

Field in LocalizedLine

Summary

DialogueLine's inline expression's substitution

public string[] Substitutions = System.Array.Empty<string>();

TextID

Field in LocalizedLine

Summary

DialogueLine's ID

public string TextID = "<unknown>";

CharacterName

Property in LocalizedLine

Summary

The name of the character, if present.

public string? CharacterName { get; }

Remarks

This value will be null if the line does not have a character name.

Text

Property in LocalizedLine

Summary

The underlying MarkupParseResult for this line.

public Markup.MarkupParseResult Text { get; set; }

TextWithoutCharacterName

Property in LocalizedLine

Summary

The underlying MarkupParseResult for this line, with any character attribute removed.

public Markup.MarkupParseResult TextWithoutCharacterName { get; }

Remarks

If the line has no character attribute, this method returns the same value as Text .

LocalizedLine

Class in Yarn.Unity

Inherits from System.Object

Summary

Represents a line, ready to be presented to the user in the localisation they have specified.

public class LocalizedLine

Fields

Name
Description

Asset

The asset associated with this line, if any.

InvalidLine

A LocalizedLine object that represents content not being found.

Metadata

Any metadata associated with this line.

RawText

DialogueLine's text

Source

The object that created this line. Most of the time will be the DialogueRunner that passed the presenter the line.

Substitutions

DialogueLine's inline expression's substitution

TextID

DialogueLine's ID

Properties

Name
Description

CharacterName

The name of the character, if present.

Text

The underlying MarkupParseResult for this line.

TextWithoutCharacterName

The underlying for this line, with any character attribute removed.

Asset

Field in

The asset associated with this line, if any.

MarkupParseResult
public Object? Asset;

Summary

LocalizedLine