From 06373ce1cf737a33d6a7b2b14cfe25ed729b9c48 Mon Sep 17 00:00:00 2001 From: David Snopek Date: Wed, 24 Apr 2024 13:01:53 -0500 Subject: Fix NOTIFICATION_POSTINITIALIZE sent twice to native parent class --- include/godot_cpp/classes/wrapped.hpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/godot_cpp') diff --git a/include/godot_cpp/classes/wrapped.hpp b/include/godot_cpp/classes/wrapped.hpp index 97f9a6e..d5a718c 100644 --- a/include/godot_cpp/classes/wrapped.hpp +++ b/include/godot_cpp/classes/wrapped.hpp @@ -89,6 +89,7 @@ protected: ::godot::List<::godot::PropertyInfo> plist_owned; void _postinitialize(); + virtual void _notificationv(int32_t p_what, bool p_reversed = false) {} Wrapped(const StringName p_godot_class); Wrapped(GodotObject *p_godot_object); @@ -374,6 +375,11 @@ public: _gde_binding_reference_callback, \ }; \ \ +protected: \ + virtual void _notificationv(int32_t p_what, bool p_reversed = false) override { \ + m_class::notification_bind(this, p_what, p_reversed); \ + } \ + \ private: // Don't use this for your classes, use GDCLASS() instead. -- cgit v1.2.3