Skip to content

State

Inherits: Resource

Object for tracking the current state of a StateMachine

Description

A State represents some state of the application, such as the currently focused menu. Together with a StateMachine, a State can be used to listen for signals whenever the state of the application changes. A State takes advantage of the fact that Godot resources are globally unique. This allows you to load a State resource from anywhere in the project to subscribe to state changes.

Properties

Type Name Default
String name
Dictionary data

Property Descriptions

name

String name

Optional human-readable name for the state

data

Dictionary data

DEPRECATED: Use 'set_meta()' or 'get_meta()' instead