فهرست منبع

Fix: Include method_ptrcall.hpp on simple structs.

Lucas Rafael 2 سال پیش
والد
کامیت
cb0b105402
1فایلهای تغییر یافته به همراه3 افزوده شده و 2 حذف شده
  1. 3 2
      binding_generator.py

+ 3 - 2
binding_generator.py

@@ -1183,8 +1183,9 @@ def generate_engine_classes_bindings(api, output_dir, use_template_get_node):
         for included in used_classes:
             result.append(f"#include <godot_cpp/{get_include_path(included)}>")
 
-        if len(used_classes) > 0:
-            result.append("")
+        if len(used_classes) == 0:
+            result.append("#include <godot_cpp/core/method_ptrcall.hpp>")
+        result.append("")
 
         result.append("namespace godot {")
         result.append("")