Browse Source

Fix `register_types.h` code in GDExtension example

Yuri Rubinsky 2 years ago
parent
commit
7119fa1cfb
1 changed files with 6 additions and 2 deletions
  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