diff options
-rw-r--r-- | core/object.cpp | 2 | ||||
-rw-r--r-- | modules/gdnative/api_generator.cpp | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/core/object.cpp b/core/object.cpp index 9184fb9cd0..000cefcac7 100644 --- a/core/object.cpp +++ b/core/object.cpp @@ -1723,7 +1723,7 @@ void Object::_bind_methods() { BIND_VMETHOD(MethodInfo("_set", PropertyInfo(Variant::STRING, "property"), PropertyInfo(Variant::NIL, "value"))); #ifdef TOOLS_ENABLED MethodInfo miget("_get", PropertyInfo(Variant::STRING, "property")); - miget.return_val.name = "var"; + miget.return_val.name = "Variant"; BIND_VMETHOD(miget); MethodInfo plget("_get_property_list"); diff --git a/modules/gdnative/api_generator.cpp b/modules/gdnative/api_generator.cpp index d5f22ee7a3..a9d1f96287 100644 --- a/modules/gdnative/api_generator.cpp +++ b/modules/gdnative/api_generator.cpp @@ -268,6 +268,8 @@ List<ClassAPI> generate_c_api_classes() { method_api.method_name = method_api.method_name.get_slice(":", 0); } else if (m->get().return_val.type != Variant::NIL) { method_api.return_type = m->get().return_val.hint == PROPERTY_HINT_RESOURCE_TYPE ? m->get().return_val.hint_string : Variant::get_type_name(m->get().return_val.type); + } else if (m->get().return_val.name != "") { + method_api.return_type = m->get().return_val.name; } else { method_api.return_type = "void"; } |