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).

YarnActionMarkupHandler

interface for handling markup actions during typewriter presentation. runs at display-time to react to text being revealed (unlike replacement marker processors, which run at parse-time and modify text). subclass and override the methods needed for the desired effect.
class_name YarnActionMarkupHandler
extends RefCounted

Inherits from RefCounted

#Nested Types

  • controls a "continue" button during line presentation. shows the button when a line starts, hides on dismiss, requests next line on click.
  • shakes the text container during [shake] markup.

#Methods

#get_attributes_at_index(int, Array)

returns all attributes covering a specific character index.
static func get_attributes_at_index(index: int, attributes: Array) -> Array[YarnMarkupAttribute]

Parameters

  • indexint
  • attributesArray

Returns Array[YarnMarkupAttribute]

#is_index_in_attribute(int, YarnMarkupAttribute)

static func is_index_in_attribute(index: int, attr: YarnMarkupAttribute) -> bool

Parameters

Returns bool

#on_character_will_appear(int, Variant, Variant)

called for each character during typewriter reveal. return a Signal to pause the typewriter, or empty Signal() to continue.
func on_character_will_appear(character_index: int, line: Variant, cancellation_token: Variant = null) -> Signal

Parameters

  • character_indexint
  • lineVariant
  • cancellation_tokenVariant

Returns Signal

#on_line_display_begin(Variant, Control)

called immediately before the first character is presented.
func on_line_display_begin(line: Variant, text_control: Control = null) -> void

Parameters

  • lineVariant
  • text_controlControl

#on_line_display_complete()

called after all characters have been presented.
func on_line_display_complete() -> void

#on_line_will_dismiss()

called right before the line dismisses (may be after typewriter completes).
func on_line_will_dismiss() -> void

#on_prepare_for_line(Variant, Control)

called before any text is visible. set up state here.
func on_prepare_for_line(line: Variant, text_control: Control = null) -> void

Parameters

  • lineVariant
  • text_controlControl

Generated from Yarn Spinner for Godot GDScript 3.3.