Pardon our dust! Docs for Yarn Spinner for Unity 3.2 and Yarn Spinner for Godot C# are on docs.yarnspinner.dev (the old docs site). Docs for Yarn Spinner for Unity 3.3 (pre-release, out ASAP), Yarn Spinner for Godot GDScript and Yarn Spinner for Unreal Engine (work in progress) are on /docs/ (the new docs site).

YarnLinePresenter

built-in presenter for displaying dialogue lines. provides a typewriter effect, a continue indicator, and a list of YarnActionMarkupHandler event handlers that are invoked as each character is revealed.
class_name YarnLinePresenter
extends YarnDialoguePresenter

Inherits from YarnDialoguePresenter

#Nested Types

#Properties

#auto_advance

var auto_advance: bool = false

Type bool

#auto_advance_delay

seconds to wait before auto-advancing.
var auto_advance_delay: float = 1.0

Type float

#character_container

hidden when no character name
var character_container: Control

Type Control

#character_label

var character_label: Label

Type Label

#characters_per_second

characters per second for LETTER mode (0 = instant).
var characters_per_second: float = 60.0

Type float

#click_anywhere_to_continue

Advance on any left click while a line is showing (never while options are up). Turn off if your game has clickable UI during dialogue.
var click_anywhere_to_continue: bool = true

Type bool

#continue_action

var continue_action: String = "ui_accept"

Type String

#continue_indicator

shown when line is fully revealed
var continue_indicator: Control

Type Control

#custom_typewriter

var custom_typewriter: YarnTypewriter

Type YarnTypewriter

#event_handlers

display-time event handlers, invoked as each character is revealed. attach YarnActionMarkupHandlerNodes in your scene and list them here. a pause handler for [pause] markup is always added automatically, ahead of this list.
var event_handlers: Array[YarnActionMarkupHandlerNode] = []

Type Array[YarnActionMarkupHandlerNode]

#fade_down_duration

var fade_down_duration: float = 0.1

Type float

#fade_up_duration

var fade_up_duration: float = 0.25

Type float

#justify_text

Justify (fill-align) the body text, matching themes that set the line text to justified. Off by default so ordinary left-aligned presenters are unchanged.
var justify_text: bool = false

Type bool

#show_character_name_in_line

var show_character_name_in_line: bool = true

Type bool

#text_label

var text_label: RichTextLabel

Type RichTextLabel

#typewriter_mode

var typewriter_mode: int = 1

Type int

#use_fade_effect

fade the panel in and out around each line.
var use_fade_effect: bool = true

Type bool

#use_markup

var use_markup: bool = true

Type bool

#words_per_second

var words_per_second: float = 10.0

Type float

#Signals

#continue_requested

emitted when the player requests to continue
signal continue_requested()

#line_dismissed

emitted when the line is dismissed from screen (after any fade-out). YarnLineAdvancer uses this to track presentation state.
signal line_dismissed(line: YarnLine)

Parameters

#line_finished

emitted when a line finishes displaying
signal line_finished(line: YarnLine)

Parameters

#line_started

emitted when a line starts displaying
signal line_started(line: YarnLine)

Parameters

#Methods

#on_dialogue_completed()

func on_dialogue_completed() -> void

#on_dialogue_started()

func on_dialogue_started() -> void

#register_marker_processor(String, YarnAttributeMarkerProcessor)

Registers a custom replacement-marker processor so that markup like [marker_name]...[/marker_name] is transformed when this presenter renders a line.
func register_marker_processor(marker_name: String, processor: YarnAttributeMarkerProcessor) -> void

Parameters

#run_line(YarnLine, YarnCancellationToken)

func run_line(line: YarnLine, token: YarnCancellationToken = null) -> void

Parameters

Generated from Yarn Spinner for Godot GDScript 3.3.