SceneState
Inherits: Reference < Object A script interface to a scene file’s data.
Description
Maintains a list of resources, nodes, exported, and overridden properties, and built-in scripts associated with a scene. PackedScene.get_state.
Methods
Enumerations
GenEditState:
- GEN_EDIT_STATE_DISABLED = 0 —- If passed to PackedScene.instance, blocks edits to the scene state.
- GEN_EDIT_STATE_INSTANCE = 1 —- If passed to PackedScene.instance, provides inherited scene resources to the local scene. Note: Only available in editor builds.
- GEN_EDIT_STATE_MAIN = 2 —- If passed to PackedScene.instance, provides local scene resources to the local scene. Only the main scene should receive the main edit state. Note: Only available in editor builds.
- GEN_EDIT_STATE_MAIN_INHERITED = 3 —- If passed to PackedScene.instance, 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.
Note: Only available in editor builds.
Method Descriptions
- Array get_connection_binds ( int idx ) const
idx.
- int get_connection_count ( ) const
Returns the number of signal connections in the scene.
idxargument used to query connection metadata in otherget_connection_*methods in the interval[0, get_connection_count() - 1].
- int get_connection_flags ( int idx ) const
idx. See ConnectFlags constants.
- String get_connection_method ( int idx ) const
idx.
- String get_connection_signal ( int idx ) const
idx.
- NodePath get_connection_source ( int idx ) const
idx, relative to the root node.
- NodePath get_connection_target ( int idx ) const
idx, relative to the root node.
- int get_node_count ( ) const
Returns the number of nodes in the scene.
idxargument used to query node data in otherget_node_*methods in the interval[0, get_node_count() - 1].
- PoolStringArray get_node_groups ( int idx ) const
idx.
- int get_node_index ( int idx ) const
idxargument used here and in other methods.
- PackedScene get_node_instance ( int idx ) const
PackedScene for the node at
idx(i.e. the whole branch starting at this node, with its child nodes and resources), ornullif the node is not an instance.
- String get_node_instance_placeholder ( int idx ) const
idxis an InstancePlaceholder.
- String get_node_name ( int idx ) const
idx.
- NodePath get_node_owner_path ( int idx ) const
idx, relative to the root node.
- NodePath get_node_path ( int idx, bool for_parent=false ) const
idx.for_parentistrue, returns the path of theidxnode’s parent instead.
- int get_node_property_count ( int idx ) const
idx.prop_idxargument used to query node property data in otherget_node_property_*methods in the interval[0, get_node_property_count() - 1].
- String get_node_property_name ( int idx, int prop_idx ) const
prop_idxfor the node atidx.
- Variant get_node_property_value ( int idx, int prop_idx ) const
prop_idxfor the node atidx.
- String get_node_type ( int idx ) const
idx.
- bool is_node_instance_placeholder ( int idx ) const
trueif the node atidxis an InstancePlaceholder.
