소스 검색

Merge pull request #58690 from elmordo/bugfix-57553-gdextension-inheritance-fix

Rémi Verschelde 3 년 전
부모
커밋
741bbb9d7c
1개의 변경된 파일6개의 추가작업 그리고 2개의 파일을 삭제
  1. 6 2
      core/object/object.cpp

+ 6 - 2
core/object/object.cpp

@@ -624,8 +624,12 @@ void Object::get_property_list(List<PropertyInfo> *p_list, bool p_reversed) cons
 	}
 
 	if (_extension) {
-		p_list->push_back(PropertyInfo(Variant::NIL, _extension->class_name, PROPERTY_HINT_NONE, String(), PROPERTY_USAGE_CATEGORY));
-		ClassDB::get_property_list(_extension->class_name, p_list, true, this);
+		const ObjectNativeExtension *current_extension = _extension;
+		while (current_extension) {
+			p_list->push_back(PropertyInfo(Variant::NIL, current_extension->class_name, PROPERTY_HINT_NONE, String(), PROPERTY_USAGE_CATEGORY));
+			ClassDB::get_property_list(current_extension->class_name, p_list, true, this);
+			current_extension = current_extension->parent;
+		}
 	}
 
 	if (_extension && _extension->get_property_list) {