Maintains a list of resources, nodes, exported, and overridden properties, and built-in scripts associated with a scene.
This class cannot be instantiated directly, it is retrieved for a given scene as the result of godot.PackedScene.getState
.
Methods
getConnectionCount():Int
Returns the number of signal connections in the scene.
The idx
argument used to query connection metadata in other get_connection_*
methods in the interval [0, get_connection_count() - 1]
.
getConnectionFlags(idx:Int):Int
Returns the connection flags for the signal at idx
. See godot.Object_ConnectFlags
constants.
getConnectionSource(idx:Int):NodePath
Returns the path to the node that owns the signal at idx
, relative to the root node.
getConnectionTarget(idx:Int):NodePath
Returns the path to the node that owns the method connected to the signal at idx
, relative to the root node.
getNodeCount():Int
Returns the number of nodes in the scene.
The idx
argument used to query node data in other get_node_*
methods in the interval [0, get_node_count() - 1]
.
inlinegetNodeGroups(idx:Int):Array<String>
Returns the list of group names associated with the node at idx
.
getNodeIndex(idx:Int):Int
Returns the node's index, which is its position relative to its siblings. This is only relevant and saved in scenes for cases where new nodes are added to an instanced or inherited scene among siblings from the base scene. Despite the name, this index is not related to the idx
argument used here and in other methods.
getNodeInstance(idx:Int):PackedScene
Returns a godot.PackedScene
for the node at idx
(i.e. the whole branch starting at this node, with its child nodes and resources), or null
if the node is not an instance.
getNodeInstancePlaceholder(idx:Int):String
Returns the path to the represented scene file if the node at idx
is an godot.InstancePlaceholder
.
getNodeOwnerPath(idx:Int):NodePath
Returns the path to the owner of the node at idx
, relative to the root node.
getNodePath(idx:Int, ?forParent:Bool):NodePath
Returns the path to the node at idx
.
If for_parent
is true
, returns the path of the idx
node's parent instead.
getNodePropertyCount(idx:Int):Int
Returns the number of exported or overridden properties for the node at idx
.
The prop_idx
argument used to query node property data in other get_node_property_*
methods in the interval [0, get_node_property_count() - 1]
.
getNodePropertyName(idx:Int, propIdx:Int):String
Returns the name of the property at prop_idx
for the node at idx
.
getNodePropertyValue(idx:Int, propIdx:Int):Dynamic
Returns the value of the property at prop_idx
for the node at idx
.
isNodeInstancePlaceholder(idx:Int):Bool
Returns true
if the node at idx
is an godot.InstancePlaceholder
.