diff --git a/core/object/class_db.h b/core/object/class_db.h index aceea5b651a..d9eec4e4a88 100644 --- a/core/object/class_db.h +++ b/core/object/class_db.h @@ -164,6 +164,7 @@ public: t->creation_func = &creator; t->exposed = true; t->class_ptr = T::get_class_ptr_static(); + t->api = current_api; T::register_custom_data_to_otdb(); } @@ -175,6 +176,7 @@ public: ERR_FAIL_COND(!t); t->exposed = true; t->class_ptr = T::get_class_ptr_static(); + t->api = current_api; //nothing } @@ -195,6 +197,7 @@ public: t->creation_func = &_create_ptr_func; t->exposed = true; t->class_ptr = T::get_class_ptr_static(); + t->api = current_api; T::register_custom_data_to_otdb(); }