Up to date

This page is up to date for Godot 4.2. If you still find outdated information, please open an issue.

SceneState

Inherits: RefCounted < Object

Provides access to a scene file's information.

Description

Maintains a list of resources, nodes, exported and overridden properties, and built-in scripts associated with a scene. They cannot be modified from a SceneState, only accessed. Useful for peeking into what a PackedScene contains without instantiating it.

This class cannot be instantiated directly, it is retrieved for a given scene as the result of PackedScene.get_state.

Methods

Array

get_connection_binds ( int idx ) const

int

get_connection_count ( ) const

int

get_connection_flags ( int idx ) const

StringName

get_connection_method ( int idx ) const

StringName

get_connection_signal ( int idx ) const

NodePath

get_connection_source ( int idx ) const

NodePath

get_connection_target ( int idx ) const

int

get_connection_unbinds ( int idx ) const

int

get_node_count ( ) const

PackedStringArray

get_node_groups ( int idx ) const

int

get_node_index ( int idx ) const

PackedScene

get_node_instance ( int idx ) const

String

get_node_instance_placeholder ( int idx ) const

StringName

get_node_name ( int idx ) const

NodePath

get_node_owner_path ( int idx ) const

NodePath

get_node_path ( int idx, bool for_parent=false ) const

int

get_node_property_count ( int idx ) const

StringName

get_node_property_name ( int idx, int prop_idx ) const

Variant

get_node_property_value ( int idx, int prop_idx ) const

StringName

get_node_type ( int idx ) const

bool

is_node_instance_placeholder ( int idx ) const


Enumerations

enum GenEditState:

GenEditState GEN_EDIT_STATE_DISABLED = 0

If passed to PackedScene.instantiate, blocks edits to the scene state.