SceneState

package
v0.0.0-...-546f9d4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 5, 2025 License: MIT Imports: 19 Imported by: 0

Documentation

Overview

Package SceneState provides methods for working with SceneState object instances.

Index

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 Any

type Any interface {
	gd.IsClass
	AsSceneState() Instance
}

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 New

func New() Instance

func (Instance) AsObject

func (self Instance) AsObject() [1]gd.Object

func (Instance) AsRefCounted

func (self Instance) AsRefCounted() [1]gd.RefCounted

func (Instance) AsSceneState

func (self Instance) AsSceneState() Instance

func (Instance) GetConnectionBinds

func (self Instance) GetConnectionBinds(idx int) []any

Returns the list of bound parameters for the signal at [param idx].

func (Instance) GetConnectionCount

func (self Instance) GetConnectionCount() int

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

func (self Instance) GetConnectionFlags(idx int) int

Returns the connection flags for the signal at [param idx]. See [enum Object.ConnectFlags] constants.

func (Instance) GetConnectionMethod

func (self Instance) GetConnectionMethod(idx int) string

Returns the method connected to the signal at [param idx].

func (Instance) GetConnectionSignal

func (self Instance) GetConnectionSignal(idx int) string

Returns the name of the signal at [param idx].

func (Instance) GetConnectionSource

func (self Instance) GetConnectionSource(idx int) string

Returns the path to the node that owns the signal at [param idx], relative to the root node.

func (Instance) GetConnectionTarget

func (self Instance) GetConnectionTarget(idx int) string

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

func (self Instance) GetConnectionUnbinds(idx int) int

Returns the number of unbound parameters for the signal at [param idx].

func (Instance) GetNodeCount

func (self Instance) GetNodeCount() int

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

func (self Instance) GetNodeGroups(idx int) []string

Returns the list of group names associated with the node at [param idx].

func (Instance) GetNodeIndex

func (self Instance) 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 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

func (self Instance) GetNodeInstancePlaceholder(idx int) string

Returns the path to the represented scene file if the node at [param idx] is an [InstancePlaceholder].

func (Instance) GetNodeName

func (self Instance) GetNodeName(idx int) string

Returns the name of the node at [param idx].

func (Instance) GetNodeOwnerPath

func (self Instance) GetNodeOwnerPath(idx int) string

Returns the path to the owner of the node at [param idx], relative to the root node.

func (Instance) GetNodePath

func (self Instance) GetNodePath(idx int) string

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

func (self Instance) GetNodePropertyCount(idx int) int

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

func (self Instance) GetNodePropertyName(idx int, prop_idx int) string

Returns the name of the property at [param prop_idx] for the node at [param idx].

func (Instance) GetNodePropertyValue

func (self Instance) GetNodePropertyValue(idx int, prop_idx int) any

Returns the value of the property at [param prop_idx] for the node at [param idx].

func (Instance) GetNodeType

func (self Instance) GetNodeType(idx int) string

Returns the type of the node at [param idx].

func (Instance) IsNodeInstancePlaceholder

func (self Instance) IsNodeInstancePlaceholder(idx int) bool

Returns [code]true[/code] if the node at [param idx] is an [InstancePlaceholder].

func (*Instance) UnsafePointer

func (self *Instance) UnsafePointer() unsafe.Pointer

func (Instance) Virtual

func (self Instance) Virtual(name string) reflect.Value

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL