Browse Source

Fix C# bindings detection of abstract classes

ClassDB::can_instance was changed recently breaking our code, as the editor is not yet initialized. Check ClassInfo::creation_func directly.
Ignacio Etcheverry 6 years ago
parent
commit
2c83255013
1 changed files with 1 additions and 1 deletions
  1. 1 1
      modules/mono/editor/bindings_generator.cpp

+ 1 - 1
modules/mono/editor/bindings_generator.cpp

@@ -2192,7 +2192,7 @@ void BindingsGenerator::_populate_object_type_interfaces() {
 
 		itype.base_name = ClassDB::get_parent_class(type_cname);
 		itype.is_singleton = Engine::get_singleton()->has_singleton(itype.proxy_name);
-		itype.is_instantiable = ClassDB::can_instance(type_cname) && !itype.is_singleton;
+		itype.is_instantiable = class_info->creation_func && !itype.is_singleton;
 		itype.is_reference = ClassDB::is_parent_class(type_cname, name_cache.type_Reference);
 		itype.memory_own = itype.is_reference;