diff options
author | David Snopek <dsnopek@gmail.com> | 2024-10-17 16:05:02 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-17 16:05:02 +0200 |
commit | a98d41f62bdb8b7aa903e8e37c1faa48fe8fdae8 (patch) | |
tree | 4c2a7bd537450ab1e394a4f5653634c030d3dc48 /include/godot_cpp/core/class_db.hpp | |
parent | 96675a814b9038b7da57607c34b8e7e69b8c1678 (diff) | |
parent | cb543c192aef18b3e9b9d2c9f2ba770a4e574ad0 (diff) | |
download | redot-cpp-a98d41f62bdb8b7aa903e8e37c1faa48fe8fdae8.tar.gz |
Merge pull request #1590 from dsnopek/reload-instance-bindings
Correctly set instance bindings on reload
Diffstat (limited to 'include/godot_cpp/core/class_db.hpp')
-rw-r--r-- | include/godot_cpp/core/class_db.hpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/include/godot_cpp/core/class_db.hpp b/include/godot_cpp/core/class_db.hpp index 988277b..85bc0fb 100644 --- a/include/godot_cpp/core/class_db.hpp +++ b/include/godot_cpp/core/class_db.hpp @@ -129,9 +129,8 @@ private: static GDExtensionClassInstancePtr _recreate_instance_func(void *data, GDExtensionObjectPtr obj) { if constexpr (!std::is_abstract_v<T>) { #ifdef HOT_RELOAD_ENABLED + Wrapped::_constructing_recreate_owner = obj; T *new_instance = (T *)memalloc(sizeof(T)); - Wrapped::RecreateInstance recreate_data = { new_instance, obj, Wrapped::recreate_instance }; - Wrapped::recreate_instance = &recreate_data; memnew_placement(new_instance, T); return new_instance; #else |