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

YarnInMemoryVariableStorage

In-memory implementation of variable storage.
class_name YarnInMemoryVariableStorage
extends YarnVariableStorage

Inherits from YarnVariableStorage

#Properties

#debug_text_view

Assign a Label or RichTextLabel to display variables in-game.
var debug_text_view: Control

Type Control

#show_debug

var show_debug: bool = false

Type bool

#validate_variable_names

var validate_variable_names: bool = true

Type bool

#Methods

#clear()

func clear() -> void

#contains(String)

func contains(variable_name: String) -> bool

Parameters

  • variable_nameString

Returns bool

#from_save_data(Dictionary)

func from_save_data(data: Dictionary) -> void

Parameters

  • dataDictionary

#get_all_variable_names()

func get_all_variable_names() -> PackedStringArray

Returns PackedStringArray

#get_all_variables_typed()

func get_all_variables_typed() -> Dictionary

Returns Dictionary

#get_all_variables()

func get_all_variables() -> Dictionary

Returns Dictionary

#get_debug_list()

func get_debug_list() -> String

Returns String

#get_value(String)

func get_value(variable_name: String) -> Variant

Parameters

  • variable_nameString

Returns Variant

#load_initial_values_from_program(YarnProgram)

func load_initial_values_from_program(program: YarnProgram) -> void

Parameters

#set_all_variables_typed(Dictionary, Dictionary, Dictionary, bool)

func set_all_variables_typed(floats: Dictionary, strings: Dictionary, bools: Dictionary, clear_first: bool = true) -> void

Parameters

  • floatsDictionary
  • stringsDictionary
  • boolsDictionary
  • clear_firstbool

#set_value(String, Variant)

func set_value(variable_name: String, value: Variant) -> void

Parameters

  • variable_nameString
  • valueVariant

#to_save_data()

func to_save_data() -> Dictionary

Returns Dictionary

#try_get_value(String)

func try_get_value(variable_name: String) -> Dictionary

Parameters

  • variable_nameString

Returns Dictionary

Generated from Yarn Spinner for Godot GDScript 3.3.