From 6fdcb18f6a2c3d3ed1525b3a1386ab92447d1109 Mon Sep 17 00:00:00 2001 From: Marc Gilleron Date: Sun, 20 Feb 2022 19:23:14 +0000 Subject: [PATCH] Fix GDCLASS when inherited class is in another namespace --- include/godot_cpp/classes/wrapped.hpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/include/godot_cpp/classes/wrapped.hpp b/include/godot_cpp/classes/wrapped.hpp index 5c9b74d8..d13d1e81 100644 --- a/include/godot_cpp/classes/wrapped.hpp +++ b/include/godot_cpp/classes/wrapped.hpp @@ -54,6 +54,10 @@ protected: Wrapped(GodotObject *p_godot_object); public: + static const char *get_class_static() { + return "Wrapped"; + } + // Must be public but you should not touch this. GodotObject *_owner = nullptr; }; @@ -102,7 +106,7 @@ public: } \ \ static const char *get_parent_class_static() { \ - return #m_inherits; \ + return m_inherits::get_class_static(); \ } \ \ static GDNativeObjectPtr create(void *data) { \ @@ -157,7 +161,7 @@ public: } \ \ static const char *get_parent_class_static() { \ - return #m_inherits; \ + return m_inherits::get_class_static(); \ } \ \ static void *___binding_create_callback(void *p_token, void *p_instance) { \