Documentation
¶
Index ¶
- func Duplicate[T Any](res T) T
- func GenerateSceneUniqueId() string
- func Library[T any]() *T
- func Load[T Any, P string | Path.ToResource](path_to_resource P) T
- type Advanced
- type Any
- type DeepDuplicateMode
- type Expanded
- type Extension
- func (o *Extension[T]) AsObject() [1]gdreference.Object
- func (o *Extension[T]) AsRefCounted() ie.RC
- func (o *Extension[T]) AsResource() Instance
- func (o *Extension[T]) EmitChanged()
- func (o *Extension[T]) GetIdForPath(path string) string
- func (o *Extension[T]) GetRid() ID
- func (o *Extension[T]) IsBuiltIn() bool
- func (o *Extension[T]) OnChanged(cb func(), flags ...Signal.Flags) *Extension[T]
- func (o *Extension[T]) OnSetupLocalToSceneRequested(cb func(), flags ...Signal.Flags) *Extension[T]
- func (o *Extension[T]) ResetState()
- func (o *Extension[T]) ResourceLocalToScene() bool
- func (o *Extension[T]) ResourceName() string
- func (o *Extension[T]) ResourcePath() string
- func (o *Extension[T]) ResourceSceneUniqueId() string
- func (o *Extension[T]) SetIdForPath(path string, id string) *Extension[T]
- func (o *Extension[T]) SetPathCache(path string) *Extension[T]
- func (o *Extension[T]) SetResourceLocalToScene(value bool) *Extension[T]
- func (o *Extension[T]) SetResourceName(value string) *Extension[T]
- func (o *Extension[T]) SetResourcePath(value string) *Extension[T]
- func (o *Extension[T]) SetResourceSceneUniqueId(value string) *Extension[T]
- func (o *Extension[T]) SetupLocalToScene()
- func (o *Extension[T]) TakeOverPath(path string)
- type ID
- type Implementation
- type Instance
- func (o Instance) AsObject() [1]gdreference.Object
- func (o Instance) AsRefCounted() ie.RC
- func (o Instance) AsResource() Instance
- func (self Instance) Duplicate() Instance
- func (self Instance) DuplicateDeep() Instance
- func (self Instance) EmitChanged()
- func (self Instance) GetIdForPath(path string) string
- func (self Instance) GetRid() ID
- func (self Instance) IsBuiltIn() bool
- func (self Instance) MoreArgs() MoreArgs
- func (self Instance) OnChanged(cb func(), flags ...Signal.Flags) Instance
- func (self Instance) OnSetupLocalToSceneRequested(cb func(), flags ...Signal.Flags) Instance
- func (self Instance) ResetState()
- func (self Instance) ResourceLocalToScene() bool
- func (self Instance) ResourceName() string
- func (self Instance) ResourcePath() string
- func (self Instance) ResourceSceneUniqueId() string
- func (self Instance) SetIdForPath(path string, id string) Instance
- func (self *Instance) SetObject(obj [1]gdreference.Object) bool
- func (self Instance) SetPathCache(path string) Instance
- func (self Instance) SetResourceLocalToScene(value bool) Instance
- func (self Instance) SetResourceName(value string) Instance
- func (self Instance) SetResourcePath(value string) Instance
- func (self Instance) SetResourceSceneUniqueId(value string) Instance
- func (self Instance) SetupLocalToScene()
- func (self Instance) TakeOverPath(path string)
- func (self Instance) Virtual(name string) reflect.Value
- type Interface
- type MoreArgs
- type Singleton
- type UID
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Duplicate ¶
func Duplicate[T Any](res T) T
Duplicate this resource, returning a new resource with its exported or PROPERTY_USAGE_STORAGE properties copied from the original.
func GenerateSceneUniqueId ¶
func GenerateSceneUniqueId() string
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 DeepDuplicateMode ¶
type DeepDuplicateMode int64 //gd:Resource.DeepDuplicateMode
const ( DeepDuplicateNone DeepDuplicateMode = 0 DeepDuplicateInternal DeepDuplicateMode = 1 DeepDuplicateAll DeepDuplicateMode = 2 )
type Extension ¶
Extension can be embedded in a new struct to create a Go extension of this class.
T must be a type that is embedding this Extension as the first field. It is unsafe and invalid to use this type directly, or embedded in any other way. See Interface for methods that can be overridden by T.
func (*Extension[T]) AsObject ¶
func (o *Extension[T]) AsObject() [1]gdreference.Object
func (*Extension[T]) AsRefCounted ¶
func (*Extension[T]) AsResource ¶
func (*Extension[T]) EmitChanged ¶
func (o *Extension[T]) EmitChanged()
func (*Extension[T]) GetIdForPath ¶
func (*Extension[T]) OnSetupLocalToSceneRequested ¶
func (*Extension[T]) ResetState ¶
func (o *Extension[T]) ResetState()
func (*Extension[T]) ResourceLocalToScene ¶
func (*Extension[T]) ResourceName ¶
func (*Extension[T]) ResourcePath ¶
func (*Extension[T]) ResourceSceneUniqueId ¶
func (*Extension[T]) SetIdForPath ¶
func (*Extension[T]) SetPathCache ¶
func (*Extension[T]) SetResourceLocalToScene ¶
func (*Extension[T]) SetResourceName ¶
func (*Extension[T]) SetResourcePath ¶
func (*Extension[T]) SetResourceSceneUniqueId ¶
func (*Extension[T]) SetupLocalToScene ¶
func (o *Extension[T]) SetupLocalToScene()
func (*Extension[T]) TakeOverPath ¶
type ID ¶
ID that uniquely identifies a resource.
func AllocateID ¶
func AllocateID() ID
New allocates a unique ID which can be used by the implementation to construct an RID. This is used mainly from native extensions to implement servers.
type Implementation ¶
type Implementation = implementation
Implementation implements Interface with empty methods.
type Instance ¶
Instance of the class with convieniently typed arguments and results.
var Nil Instance
Nil is a nil/null instance of the class. Equivalent to the zero value.
func (Instance) AsObject ¶
func (o Instance) AsObject() [1]gdreference.Object
func (Instance) AsRefCounted ¶
func (Instance) AsResource ¶
func (Instance) DuplicateDeep ¶
func (Instance) EmitChanged ¶
func (self Instance) EmitChanged()
func (Instance) GetIdForPath ¶
func (Instance) MoreArgs ¶
MoreArgs enables certain functions to be called with additional 'optional' arguments.
func (Instance) OnSetupLocalToSceneRequested ¶
func (Instance) ResetState ¶
func (self Instance) ResetState()
func (Instance) ResourceLocalToScene ¶
func (Instance) ResourceName ¶
func (Instance) ResourcePath ¶
func (Instance) ResourceSceneUniqueId ¶
func (Instance) SetPathCache ¶
func (Instance) SetResourceLocalToScene ¶
SetResourceLocalToScene sets the property returned by [IsLocalToScene]. Returns the instance, so that property settings can be chained.
func (Instance) SetResourceName ¶
SetResourceName sets the property returned by [GetName]. Returns the instance, so that property settings can be chained.
func (Instance) SetResourcePath ¶
SetResourcePath sets the property returned by [GetPath]. Returns the instance, so that property settings can be chained.
func (Instance) SetResourceSceneUniqueId ¶
SetResourceSceneUniqueId sets the property returned by [GetSceneUniqueId]. Returns the instance, so that property settings can be chained.
func (Instance) SetupLocalToScene ¶
func (self Instance) SetupLocalToScene()
func (Instance) TakeOverPath ¶
type MoreArgs ¶
MoreArgs is a container for Instance functions with additional 'optional' arguments.
func (MoreArgs) DuplicateDeep ¶
func (self MoreArgs) DuplicateDeep(deep_subresources_mode DeepDuplicateMode) Instance
type Singleton ¶
Singleton can be embedded in a new struct to create a Go singleton extension of the class.
It will become available as a global inside scripts and any any other Go Extension types will have any *T typed fields filled in to point at this singleton once they have been instantiated.
T must be a type that is embedding this Singleton as the first field. It is unsafe and invalid to use this type directly, or embedded in any other way. See Interface for methods that can be overridden by T.