浏览代码

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 1 年之前
父节点
当前提交
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"
     compatibility_minimum = "4.1"
+    reloadable = true
 
     [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.
 You should also set the minimum compatible Godot version with ``compatability_minimum``,
 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
 dynamic library in the project's filesystem for each supported platform. It will