Documentation
¶
Overview ¶
Package SceneState provides methods for working with SceneState object instances.
Index ¶
- type Advanced
- type Any
- type GenEditState
- type Instance
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) AsRefCounted() [1]gd.RefCounted
- func (self Instance) AsSceneState() Instance
- func (self Instance) GetConnectionBinds(idx int) []any
- func (self Instance) GetConnectionCount() int
- func (self Instance) GetConnectionFlags(idx int) int
- func (self Instance) GetConnectionMethod(idx int) string
- func (self Instance) GetConnectionSignal(idx int) string
- func (self Instance) GetConnectionSource(idx int) string
- func (self Instance) GetConnectionTarget(idx int) string
- func (self Instance) GetConnectionUnbinds(idx int) int
- func (self Instance) GetNodeCount() int
- func (self Instance) GetNodeGroups(idx int) []string
- func (self Instance) GetNodeIndex(idx int) int
- func (self Instance) GetNodeInstance(idx int) [1]gdclass.PackedScene
- func (self Instance) GetNodeInstancePlaceholder(idx int) string
- func (self Instance) GetNodeName(idx int) string
- func (self Instance) GetNodeOwnerPath(idx int) string
- func (self Instance) GetNodePath(idx int) string
- func (self Instance) GetNodePropertyCount(idx int) int
- func (self Instance) GetNodePropertyName(idx int, prop_idx int) string
- func (self Instance) GetNodePropertyValue(idx int, prop_idx int) any
- func (self Instance) GetNodeType(idx int) string
- func (self Instance) IsNodeInstancePlaceholder(idx int) bool
- func (self *Instance) UnsafePointer() unsafe.Pointer
- func (self Instance) Virtual(name string) reflect.Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Advanced ¶
type Advanced = class
Advanced exposes a 1:1 low-level instance of the class, undocumented, for those who know what they are doing.
type GenEditState ¶
type GenEditState = gdclass.SceneStateGenEditState //gd:SceneState.GenEditState
const ( /*If passed to [method PackedScene.instantiate], blocks edits to the scene state.*/ GenEditStateDisabled GenEditState = 0 /*If passed to [method PackedScene.instantiate], provides inherited scene resources to the local scene. [b]Note:[/b] Only available in editor builds.*/ GenEditStateInstance GenEditState = 1 /*If passed to [method PackedScene.instantiate], provides local scene resources to the local scene. Only the main scene should receive the main edit state. [b]Note:[/b] Only available in editor builds.*/ GenEditStateMain GenEditState = 2 /*If passed to [method PackedScene.instantiate], it's similar to [constant GEN_EDIT_STATE_MAIN], but for the case where the scene is being instantiated to be the base of another one. [b]Note:[/b] Only available in editor builds.*/ GenEditStateMainInherited GenEditState = 3 )
type Instance ¶
type Instance [1]gdclass.SceneState
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 [method PackedScene.get_state].
var Nil Instance
Nil is a nil/null instance of the class. Equivalent to the zero value.
func (Instance) AsRefCounted ¶
func (self Instance) AsRefCounted() [1]gd.RefCounted
func (Instance) AsSceneState ¶
func (Instance) GetConnectionBinds ¶
Returns the list of bound parameters for the signal at [param idx].
func (Instance) GetConnectionCount ¶
Returns the number of signal connections in the scene. The [code]idx[/code] argument used to query connection metadata in other [code]get_connection_*[/code] methods in the interval [code][0, get_connection_count() - 1][/code].
func (Instance) GetConnectionFlags ¶
Returns the connection flags for the signal at [param idx]. See [enum Object.ConnectFlags] constants.
func (Instance) GetConnectionMethod ¶
Returns the method connected to the signal at [param idx].
func (Instance) GetConnectionSignal ¶
Returns the name of the signal at [param idx].
func (Instance) GetConnectionSource ¶
Returns the path to the node that owns the signal at [param idx], relative to the root node.
func (Instance) GetConnectionTarget ¶
Returns the path to the node that owns the method connected to the signal at [param idx], relative to the root node.
func (Instance) GetConnectionUnbinds ¶
Returns the number of unbound parameters for the signal at [param idx].
func (Instance) GetNodeCount ¶
Returns the number of nodes in the scene. The [code]idx[/code] argument used to query node data in other [code]get_node_*[/code] methods in the interval [code][0, get_node_count() - 1][/code].
func (Instance) GetNodeGroups ¶
Returns the list of group names associated with the node at [param idx].
func (Instance) GetNodeIndex ¶
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 instantiated or inherited scene among siblings from the base scene. Despite the name, this index is not related to the [param idx] argument used here and in other methods.
func (Instance) GetNodeInstance ¶
func (self Instance) GetNodeInstance(idx int) [1]gdclass.PackedScene
Returns a [PackedScene] for the node at [param idx] (i.e. the whole branch starting at this node, with its child nodes and resources), or [code]null[/code] if the node is not an instance.
func (Instance) GetNodeInstancePlaceholder ¶
Returns the path to the represented scene file if the node at [param idx] is an [InstancePlaceholder].
func (Instance) GetNodeName ¶
Returns the name of the node at [param idx].
func (Instance) GetNodeOwnerPath ¶
Returns the path to the owner of the node at [param idx], relative to the root node.
func (Instance) GetNodePath ¶
Returns the path to the node at [param idx]. If [param for_parent] is [code]true[/code], returns the path of the [param idx] node's parent instead.
func (Instance) GetNodePropertyCount ¶
Returns the number of exported or overridden properties for the node at [param idx]. The [code]prop_idx[/code] argument used to query node property data in other [code]get_node_property_*[/code] methods in the interval [code][0, get_node_property_count() - 1][/code].
func (Instance) GetNodePropertyName ¶
Returns the name of the property at [param prop_idx] for the node at [param idx].
func (Instance) GetNodePropertyValue ¶
Returns the value of the property at [param prop_idx] for the node at [param idx].
func (Instance) GetNodeType ¶
Returns the type of the node at [param idx].
func (Instance) IsNodeInstancePlaceholder ¶
Returns [code]true[/code] if the node at [param idx] is an [InstancePlaceholder].