LinePresenter

Class in Yarn.Unity

Inherits from DialoguePresenterBase

Summary

A Dialogue Presenter that presents lines of dialogue, using Unity UI elements.

public sealed class LinePresenter : DialoguePresenterBase

Fields

NameDescription
autoAdvanceControls whether this Line View will automatically to the Dialogue Runner that the line is complete as soon as the line has finished appearing.
autoAdvanceDelayThe amount of time after the line finishes appearing before automatically ending the line, in seconds.
canvasGroupThe canvas group that contains the UI elements used by this Line View.
characterNameContainerThe game object that holds the characterNameText text field.
characterNameTextThe TMPro.TMP_Text object that displays the character names found in dialogue lines.
customTypewriter
fadeDownDurationThe time that the fade effect will take to fade lines out.
fadeUpDurationThe time that the fade effect will take to fade lines in.
lettersPerSecondThe number of characters per second that should appear during a typewriter effect.
lineTextThe TMPro.TMP_Text object that displays the text of dialogue lines.
showCharacterNameInLineControls whether the lineText object will show the character name present in the line or not.
useFadeEffectControls whether the line view should fade in when lines appear, and fade out when lines disappear.
wordsPerSecond

Methods

NameDescription
OnDialogueCompleteAsync()Called by the DialogueRunner to signal that the dialogue has ended, and no more lines will be delivered.
OnDialogueStartedAsync()Called by the DialogueRunner to signal that dialogue has started.
RunLineAsync(LocalizedLine,LineCancellationToken)Presents a line using the configured text view.