Skip to main content
Version: 1.3

SproutyDialogsEditorStateManager

Inherits: RefCounted

Description​

This class manages the temporary editor state for the Sprouty Dialogs plugin. It provides methods to get and set editor state values, such as the state of the editor window (the last opened dialogue files and the selected file).

Important

This class is for internal editor use. The editor state is stored in a cache file inside the project's .godot folder, so the values will reset if the caches are cleared.

Methods​

Return TypeMethod
Variantget_value(section: String, key: String)
voidset_value(section: String, key: String, value: Variant)

Constants​

const EDITOR_STATE_FILE_PATH = "res://.godot/sprouty_dialogs_cache.cfg"

Path in which the cache file that stores the editor state is saved.


Method Descriptions​

static func get_value(section: String, key: String) -> Variant

Returns an editor state value from the cache file. If the value section or key are not found, it returns null and prints an error message.


static func set_value(section: String, key: String, value: Variant) -> void

Sets an editor state value in the cache file. If the value section or key are not found, it prints an error message.