GDNativeLibrary

An external library containing functions or script classes to use in Godot.

A GDNative library can implement NativeScripts, global functions to call with the GDNative class, or low-level engine extensions through interfaces such as ARVRInterfaceGDNative. The library must be compiled for each platform and architecture that the project will run on.

Members

Aliases

BaseClasses
alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses)
Undocumented in source.

Functions

getConfigFile
Ref!ConfigFile getConfigFile()
getCurrentDependencies
PoolStringArray getCurrentDependencies()

Returns paths to all dependency libraries for the current platform and architecture.

getCurrentLibraryPath
String getCurrentLibraryPath()

Returns the path to the dynamic library file for the current platform and architecture.

getSymbolPrefix
String getSymbolPrefix()
isReloadable
bool isReloadable()
isSingleton
bool isSingleton()
opAssign
typeof(null) opAssign(typeof(null) n)
opEquals
bool opEquals(GDNativeLibrary other)
opEquals
bool opEquals(typeof(null) n)
setConfigFile
void setConfigFile(ConfigFile config_file)
setLoadOnce
void setLoadOnce(bool load_once)
setReloadable
void setReloadable(bool reloadable)
setSingleton
void setSingleton(bool singleton)
setSymbolPrefix
void setSymbolPrefix(String symbol_prefix)
shouldLoadOnce
bool shouldLoadOnce()
toHash
size_t toHash()

Mixins

__anonymous
mixin baseCasts
Undocumented in source.

Properties

configFile
ConfigFile configFile [@property getter]
ConfigFile configFile [@property setter]

This resource in INI-style ConfigFile format, as in .gdnlib files.

loadOnce
bool loadOnce [@property getter]
bool loadOnce [@property setter]

If true, Godot loads only one copy of the library and each script that references the library will share static data like static or global variables. If false, Godot loads a separate copy of the library into memory for each script that references it.

reloadable
bool reloadable [@property getter]
bool reloadable [@property setter]

If true, the editor will temporarily unload the library whenever the user switches away from the editor window, allowing the user to recompile the library without restarting Godot. Note: If the library defines tool scripts that run inside the editor, reloadable must be false. Otherwise, the editor will attempt to unload the tool scripts while they're in use and crash.

singleton
bool singleton [@property getter]
bool singleton [@property setter]

If true, Godot loads the library at startup rather than the first time a script uses the library, calling {prefix}gdnative_singleton after initializing the library (where {prefix} is the value of symbolPrefix). The library remains loaded as long as Godot is running. Note: A singleton library cannot be reloadable.

symbolPrefix
String symbolPrefix [@property getter]
String symbolPrefix [@property setter]

The prefix this library's entry point functions begin with. For example, a GDNativeLibrary would declare its gdnative_init function as godot_gdnative_init by default. On platforms that require statically linking libraries (currently only iOS), each library must have a different symbol_prefix.

Static functions

_new
GDNativeLibrary _new()

Construct a new instance of GDNativeLibrary. Note: use memnew!GDNativeLibrary instead.

Static variables

_classBindingInitialized
bool _classBindingInitialized;
Undocumented in source.

Structs

GDNativeClassBinding
struct GDNativeClassBinding
Undocumented in source.

Unions

__anonymous
union __anonymous
Undocumented in source.

Variables

_GODOT_internal_name
enum string _GODOT_internal_name;
Undocumented in source.

Mixed In Members

From mixin baseCasts

as
inout(To) as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
inout(To) as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
inout(ToRef) as()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(ToRef)
Undocumented in source.
opCast
void* opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
godot_object opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
bool opCast()
Undocumented in source. Be warned that the author may not have intended to support it.

Meta