Index · Object → GDExtensionManager

GDExtensionManager

Provides access to GDExtension functionality.

Class Description

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.

Methods

func get_extension(path: String) -> GDExtension

Returns the GDExtension at the given file path, or null if it has not been loaded or does not exist.

func get_loaded_extensions() -> PackedStringArray

Returns the file paths of all currently loaded extensions.

func is_extension_loaded(path: String) -> bool

Returns true if the extension at the given file path has already been loaded successfully. See also get_loaded_extensions().

func load_extension(path: String) -> GDExtensionManager.LoadStatus

Loads an extension by absolute file path. The path needs to point to a valid GDExtension. Returns LOAD_STATUS_OK if successful.

func load_extension_from_function(path: String, init_func: const GDExtensionInitializationFunction*) -> GDExtensionManager.LoadStatus

Loads the extension already in address space via the given path and initialization function. The path needs to be unique and start with "libgodot://". Returns LOAD_STATUS_OK if successful.

func reload_extension(path: String) -> GDExtensionManager.LoadStatus

Reloads the extension at the given file path. The path needs to point to a valid GDExtension, otherwise this method may return either LOAD_STATUS_NOT_LOADED or LOAD_STATUS_FAILED.

Note: You can only reload extensions in the editor. In release builds, this method always fails and returns LOAD_STATUS_FAILED.

func unload_extension(path: String) -> GDExtensionManager.LoadStatus

Unloads an extension by file path. The path needs to point to an already loaded GDExtension, otherwise this method returns LOAD_STATUS_NOT_LOADED.

Inherited from Object (62)
func _get(property: StringName) -> Variant
func _get_property_list() -> Dictionary[]
func _init() -> void
func _iter_get(iter: Variant) -> Variant
func _iter_init(iter: Array) -> bool
func _iter_next(iter: Array) -> bool
func _notification(what: int) -> void
func _set(property: StringName, value: Variant) -> bool
func _to_string() -> String
func _validate_property(property: Dictionary) -> void
func add_user_signal(signal: String, arguments: Array = []) -> void
func call(method: StringName) -> Variant
func callv(method: StringName, arg_array: Array) -> Variant
func cancel_free() -> void
func connect(signal: StringName, callable: Callable, flags: int = 0) -> Error
func disconnect(signal: StringName, callable: Callable) -> void
func emit_signal(signal: StringName) -> Error
func free() -> void
func get(property: StringName) -> Variant
func get_class() -> String
func get_incoming_connections() -> Dictionary[]
func get_indexed(property_path: NodePath) -> Variant
func get_meta(name: StringName, default: Variant = null) -> Variant
func get_meta_list() -> StringName[]
func get_method_list() -> Dictionary[]
func get_property_list() -> Dictionary[]
func get_signal_connection_list(signal: StringName) -> Dictionary[]
func get_signal_list() -> Dictionary[]
func has_meta(name: StringName) -> bool
func has_method(method: StringName) -> bool
func has_signal(signal: StringName) -> bool
func is_class(class: StringName) -> bool
func is_connected(signal: StringName, callable: Callable) -> bool
func notification(what: int, reversed: bool = false) -> void
func remove_meta(name: StringName) -> void
func remove_user_signal(signal: StringName) -> void
func set(property: StringName, value: Variant) -> void
func set_block_signals(enable: bool) -> void
func set_deferred(property: StringName, value: Variant) -> void
func set_indexed(property_path: NodePath, value: Variant) -> void
func set_message_translation(enable: bool) -> void
func set_meta(name: StringName, value: Variant) -> void
func set_script(script: Variant) -> void
func set_translation_domain(domain: StringName) -> void
func to_string() -> String
func tr(message: StringName, context: StringName = &"") -> String
func tr_n(message: StringName, plural_message: StringName, n: int, context: StringName = &"") -> String

Signals

signal extension_loaded(extension: GDExtension)

Emitted after the editor has finished loading a new extension.

Note: This signal is only emitted in editor builds.

signal extension_unloading(extension: GDExtension)

Emitted before the editor starts unloading an extension.

Note: This signal is only emitted in editor builds.

signal extensions_reloaded()

Emitted after the editor has finished reloading one or more extensions.

Inherited from Object (2)

Enums & Constants

enum LoadStatus
LOAD_STATUS_OK = 0

The extension has loaded successfully.

LOAD_STATUS_FAILED = 1

The extension has failed to load, possibly because it does not exist or has missing dependencies.

LOAD_STATUS_ALREADY_LOADED = 2

The extension has already been loaded.

LOAD_STATUS_NOT_LOADED = 3

The extension has not been loaded.

LOAD_STATUS_NEEDS_RESTART = 4

The extension requires the application to restart to fully load.