Fix NOTIFICATION_POSTINITIALIZE sent twice to native parent class

This commit is contained in:
David Snopek
2024-04-24 13:01:53 -05:00
parent ad307e4b9c
commit 06373ce1cf
2 changed files with 7 additions and 4 deletions

View File

@@ -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.