diff options
| author | Ignacio Etcheverry | 2017-10-11 13:54:34 +0200 |
|---|---|---|
| committer | GitHub | 2017-10-11 13:54:34 +0200 |
| commit | 740ef3dc9788d62fc07567149a3768e90af781ce (patch) | |
| tree | 6f0964e29cec7baa98932a658e38830472ee0cc0 /modules/mono/csharp_script.cpp | |
| parent | 45c878e3803c06361dfcad9d7a329ba12fc01570 (diff) | |
| parent | 9b6f65af82d02d1ec92de1d2d6250884de20cbf3 (diff) | |
| download | godot-740ef3dc9788d62fc07567149a3768e90af781ce.tar.gz godot-740ef3dc9788d62fc07567149a3768e90af781ce.tar.zst godot-740ef3dc9788d62fc07567149a3768e90af781ce.zip | |
Diffstat (limited to 'modules/mono/csharp_script.cpp')
| -rw-r--r-- | modules/mono/csharp_script.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/modules/mono/csharp_script.cpp b/modules/mono/csharp_script.cpp index fe78ce423..b47578272 100644 --- a/modules/mono/csharp_script.cpp +++ b/modules/mono/csharp_script.cpp @@ -654,6 +654,13 @@ void *CSharpLanguage::alloc_instance_binding_data(Object *p_object) { StringName type_name = p_object->get_class_name(); + // ¯\_(ツ)_/¯ + const ClassDB::ClassInfo *classinfo = ClassDB::classes.getptr(type_name); + while (classinfo && !classinfo->exposed) + classinfo = classinfo->inherits_ptr; + ERR_FAIL_NULL_V(classinfo, NULL); + type_name = classinfo->name; + GDMonoClass *type_class = GDMonoUtils::type_get_proxy_class(type_name); ERR_FAIL_NULL_V(type_class, NULL); |
