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.

GenEditState GEN_EDIT_STATE_INSTANCE = 1

If passed to PackedScene.instantiate, provides inherited scene resources to the local scene.

Note: Only available in editor builds.

GenEditState GEN_EDIT_STATE_MAIN = 2

If passed to PackedScene.instantiate, provides local scene resources to the local scene. Only the main scene should receive the main edit state.

Note: Only available in editor builds.

GenEditState GEN_EDIT_STATE_MAIN_INHERITED = 3

If passed to PackedScene.instantiate, it's similar to GEN_EDIT_STATE_MAIN, but for the case where the scene is being instantiated to be the base of another one.

Not