瀏覽代碼

Merge pull request #8009 from Chaosus/gdextension_fix

Yuri Rubinsky 1 年之前
父節點
當前提交
63d77f6939
共有 1 個文件被更改,包括 6 次插入2 次删除
  1. 6 2
      tutorials/scripting/gdextension/gdextension_cpp_example.rst

+ 6 - 2
tutorials/scripting/gdextension/gdextension_cpp_example.rst

@@ -309,8 +309,12 @@ At last, we need the header file for the ``register_types.cpp`` named
     #ifndef GDEXAMPLE_REGISTER_TYPES_H
     #define GDEXAMPLE_REGISTER_TYPES_H
 
-    void initialize_example_module();
-    void uninitialize_example_module();
+    #include <godot_cpp/core/class_db.hpp>
+
+    using namespace godot;
+
+    void initialize_example_module(ModuleInitializationLevel p_level);
+    void uninitialize_example_module(ModuleInitializationLevel p_level);
 
     #endif // GDEXAMPLE_REGISTER_TYPES_H