Pārlūkot izejas kodu

Merge pull request #52293 from neikeq/class-db-api-type-bug

Fix ClassDB API type mismatch bug between --editor and player
Rémi Verschelde 4 gadi atpakaļ
vecāks
revīzija
b48c6418fe
1 mainītis faili ar 3 papildinājumiem un 0 dzēšanām
  1. 3 0
      core/object/class_db.h

+ 3 - 0
core/object/class_db.h

@@ -164,6 +164,7 @@ public:
 		t->creation_func = &creator<T>;
 		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>;
 		t->exposed = true;
 		t->class_ptr = T::get_class_ptr_static();
+		t->api = current_api;
 		T::register_custom_data_to_otdb();
 	}