فهرست منبع

Update GDExtension tutorial with the hot reload feature (#9618)

Although the tutorial assumed the hot reload feature, it wasn't enabled in the example config file. Also it didn't mention that it only works if it's compiled in debug mode.
Balázs Kalydi 11 ماه پیش
والد
کامیت
91717ff234
1فایلهای تغییر یافته به همراه3 افزوده شده و 0 حذف شده
  1. 3 0
      tutorials/scripting/gdextension/gdextension_cpp_example.rst

+ 3 - 0
tutorials/scripting/gdextension/gdextension_cpp_example.rst

@@ -365,6 +365,7 @@ loaded for each platform and the entry function for the module. It is called ``g
 
 
     entry_symbol = "example_library_init"
     entry_symbol = "example_library_init"
     compatibility_minimum = "4.1"
     compatibility_minimum = "4.1"
+    reloadable = true
 
 
     [libraries]
     [libraries]
 
 
@@ -388,6 +389,8 @@ loaded for each platform and the entry function for the module. It is called ``g
 This file contains a ``configuration`` section that controls the entry function of the module.
 This file contains a ``configuration`` section that controls the entry function of the module.
 You should also set the minimum compatible Godot version with ``compatability_minimum``,
 You should also set the minimum compatible Godot version with ``compatability_minimum``,
 which prevents older version of Godot from trying to load your extension.
 which prevents older version of Godot from trying to load your extension.
+The ``reloadable`` flag enables automatic reloading of your extension by the editor every time you recompile it,
+without needing to restart the editor. This only works if you compile your extension in debug mode (default).
 
 
 The ``libraries`` section is the important bit: it tells Godot the location of the
 The ``libraries`` section is the important bit: it tells Godot the location of the
 dynamic library in the project's filesystem for each supported platform. It will
 dynamic library in the project's filesystem for each supported platform. It will