From e46f2be4d7170ddd04364ae2d6a735b27e14a416 Mon Sep 17 00:00:00 2001 From: sheepandshepherd Date: Sun, 6 Oct 2019 04:53:08 +0200 Subject: [PATCH] Document GDNativeLibrary (cherry picked from commit 04dbcd7f5a9d84562b79ad123f7e3722f7bf2c57) --- modules/gdnative/doc_classes/GDNativeLibrary.xml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/modules/gdnative/doc_classes/GDNativeLibrary.xml b/modules/gdnative/doc_classes/GDNativeLibrary.xml index 28bdf8107ed..e67e31afb04 100644 --- a/modules/gdnative/doc_classes/GDNativeLibrary.xml +++ b/modules/gdnative/doc_classes/GDNativeLibrary.xml @@ -1,35 +1,50 @@ + An external library containing functions or script classes to use in Godot. + A GDNative library can implement [NativeScript]s, 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. + https://docs.godotengine.org/en/latest/tutorials/plugins/gdnative/gdnative-c-example.html + https://docs.godotengine.org/en/latest/tutorials/plugins/gdnative/gdnative-cpp-example.html + Returns paths to all dependency libraries for the current platform and architecture. + Returns the path to the dynamic library file for the current platform and architecture. + This resource in INI-style [ConfigFile] format, as in [code].gdnlib[/code] files. + If [code]true[/code], 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 [code]false[/code], Godot loads a separate copy of the library into memory for each script that references it. + If [code]true[/code], 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. + [b]Note:[/b] If the library defines tool scripts that run inside the editor, [code]reloadable[/code] must be [code]false[/code]. Otherwise, the editor will attempt to unload the tool scripts while they're in use and crash. + If [code]true[/code], Godot loads the library at startup rather than the first time a script uses the library, calling [code]gdnative_singleton[/code] after initializing the library. The library remains loaded as long as Godot is running. + [b]Note:[/b] A singleton library cannot be [member reloadable]. + The prefix this library's entry point functions begin with. For example, a GDNativeLibrary would declare its [code]gdnative_init[/code] function as [code]godot_gdnative_init[/code] by default. + On platforms that require statically linking libraries (currently only iOS), each library must have a different [code]symbol_prefix[/code].