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

YarnMarkupParseResult

the result of parsing a line of marked-up text. contains plain text (markup tags removed) and attributes describing positions.
class_name YarnMarkupParseResult
extends RefCounted

Inherits from RefCounted

#Properties

#attributes

the markup attributes found in this parse result.
var attributes: Array[YarnMarkupAttribute] = []

Type Array[YarnMarkupAttribute]

#text

the plain text with all markup tags removed.
var text: String = ""

Type String

#Methods

#delete_range(YarnMarkupAttribute)

deletes an attribute's text range and returns a new parse result with remaining attributes adjusted for the removed text.
func delete_range(attr_to_delete: YarnMarkupAttribute) -> YarnMarkupParseResult

Parameters

Returns YarnMarkupParseResult

#get_character_name()

func get_character_name() -> String

Returns String

#text_for_attribute(YarnMarkupAttribute)

returns the substring of text covered by an attribute.
func text_for_attribute(attr: YarnMarkupAttribute) -> String

Parameters

Returns String

#try_get_attribute_with_name(String)

returns the first attribute with the specified name, or null if not found.
func try_get_attribute_with_name(attr_name: String) -> YarnMarkupAttribute

Parameters

  • attr_nameString

Returns YarnMarkupAttribute

#without_character_name()

func without_character_name() -> YarnMarkupParseResult

Returns YarnMarkupParseResult

Generated from Yarn Spinner for Godot GDScript 3.3.