Documentation
¶
Overview ¶
Package GDExtensionManager provides methods for working with GDExtensionManager object instances.
Index ¶
- func Advanced() class
- func GetExtension(path string) [1]gdclass.GDExtension
- func GetLoadedExtensions() []string
- func IsExtensionLoaded(path string) bool
- func LoadExtension(path string) gdclass.GDExtensionManagerLoadStatus
- func OnExtensionsReloaded(cb func())
- func ReloadExtension(path string) gdclass.GDExtensionManagerLoadStatus
- func UnloadExtension(path string) gdclass.GDExtensionManagerLoadStatus
- 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) [1]gdclass.GDExtension
Returns the [GDExtension] at the given file [param path], or [code]null[/code] 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 [code]true[/code] if the extension at the given file [param path] has already been loaded successfully. See also [method get_loaded_extensions].
func LoadExtension ¶
func LoadExtension(path string) gdclass.GDExtensionManagerLoadStatus
Loads an extension by absolute file path. The [param path] needs to point to a valid [GDExtension]. Returns [constant LOAD_STATUS_OK] if successful.
func OnExtensionsReloaded ¶
func OnExtensionsReloaded(cb func())
func ReloadExtension ¶
func ReloadExtension(path string) gdclass.GDExtensionManagerLoadStatus
Reloads the extension at the given file path. The [param path] needs to point to a valid [GDExtension], otherwise this method may return either [constant LOAD_STATUS_NOT_LOADED] or [constant LOAD_STATUS_FAILED]. [b]Note:[/b] You can only reload extensions in the editor. In release builds, this method always fails and returns [constant LOAD_STATUS_FAILED].
func UnloadExtension ¶
func UnloadExtension(path string) gdclass.GDExtensionManagerLoadStatus
Unloads an extension by file path. The [param path] needs to point to an already loaded [GDExtension], otherwise this method returns [constant LOAD_STATUS_NOT_LOADED].
Types ¶
type LoadStatus ¶
type LoadStatus = gdclass.GDExtensionManagerLoadStatus //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 )