Documentation
¶
Overview ¶
The GDExtensionManager loads, initializes, and keeps track of all available GDExtension libraries in the project.
Note: Do not worry about GDExtension unless you know what you are doing.
Index ¶
- func Advanced() class
- func GetExtension(path string) GDExtension.Instance
- func GetLoadedExtensions() []string
- func IsExtensionLoaded(path string) bool
- func OnExtensionLoaded(cb func(extension GDExtension.Instance), flags ...Signal.Flags)
- func OnExtensionUnloading(cb func(extension GDExtension.Instance), flags ...Signal.Flags)
- func OnExtensionsReloaded(cb func(), flags ...Signal.Flags)
- type Extension
- type ID
- type Instance
- type LoadStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Advanced ¶
func Advanced() class
Advanced exposes a 1:1 low-level instance of the class, undocumented, for those who know what they are doing.
func GetExtension ¶
func GetExtension(path string) GDExtension.Instance
Returns the GDExtension at the given file 'path', or null if it has not been loaded or does not exist.
func GetLoadedExtensions ¶
func GetLoadedExtensions() []string
Returns the file paths of all currently loaded extensions.
func IsExtensionLoaded ¶
Returns true if the extension at the given file 'path' has already been loaded successfully. See also GetLoadedExtensions.
func OnExtensionLoaded ¶
func OnExtensionLoaded(cb func(extension GDExtension.Instance), flags ...Signal.Flags)
Emitted after the editor has finished loading a new extension.
Note: This signal is only emitted in editor builds.
func OnExtensionUnloading ¶
func OnExtensionUnloading(cb func(extension GDExtension.Instance), flags ...Signal.Flags)
Emitted before the editor starts unloading an extension.
Note: This signal is only emitted in editor builds.
func OnExtensionsReloaded ¶
Emitted after the editor has finished reloading one or more extensions.
Types ¶
type Extension ¶
Extension can be embedded in a new struct to create an extension of this class. T should be the type that is embedding this Extension
type ID ¶
ID is a typed object ID (reference) to an instance of this class, use it to store references to objects with unknown lifetimes, as an ID will not panic on use if the underlying object has been destroyed.
type Instance ¶
type Instance [1]gdclass.GDExtensionManager
Instance of the class with convieniently typed arguments and results.
type LoadStatus ¶
type LoadStatus int //gd:GDExtensionManager.LoadStatus
const ( // The extension has loaded successfully. LoadStatusOk LoadStatus = 0 // The extension has failed to load, possibly because it does not exist or has missing dependencies. LoadStatusFailed LoadStatus = 1 // The extension has already been loaded. LoadStatusAlreadyLoaded LoadStatus = 2 // The extension has not been loaded. LoadStatusNotLoaded LoadStatus = 3 // The extension requires the application to restart to fully load. LoadStatusNeedsRestart LoadStatus = 4 )
func LoadExtension ¶
func LoadExtension(path string) LoadStatus
Loads an extension by absolute file path. The 'path' needs to point to a valid GDExtension. Returns LoadStatusOk if successful.
func ReloadExtension ¶
func ReloadExtension(path string) LoadStatus
Reloads the extension at the given file path. The 'path' needs to point to a valid GDExtension, otherwise this method may return either LoadStatusNotLoaded or LoadStatusFailed.
Note: You can only reload extensions in the editor. In release builds, this method always fails and returns LoadStatusFailed.
func UnloadExtension ¶
func UnloadExtension(path string) LoadStatus
Unloads an extension by file path. The 'path' needs to point to an already loaded GDExtension, otherwise this method returns LoadStatusNotLoaded.