mirror of
https://github.com/godotengine/godot.git
synced 2024-11-15 08:32:54 +00:00
_get return type fix
This commit is contained in:
parent
0afa77a8a2
commit
826c51c70e
@ -1723,7 +1723,7 @@ void Object::_bind_methods() {
|
|||||||
BIND_VMETHOD(MethodInfo("_set", PropertyInfo(Variant::STRING, "property"), PropertyInfo(Variant::NIL, "value")));
|
BIND_VMETHOD(MethodInfo("_set", PropertyInfo(Variant::STRING, "property"), PropertyInfo(Variant::NIL, "value")));
|
||||||
#ifdef TOOLS_ENABLED
|
#ifdef TOOLS_ENABLED
|
||||||
MethodInfo miget("_get", PropertyInfo(Variant::STRING, "property"));
|
MethodInfo miget("_get", PropertyInfo(Variant::STRING, "property"));
|
||||||
miget.return_val.name = "var";
|
miget.return_val.name = "Variant";
|
||||||
BIND_VMETHOD(miget);
|
BIND_VMETHOD(miget);
|
||||||
|
|
||||||
MethodInfo plget("_get_property_list");
|
MethodInfo plget("_get_property_list");
|
||||||
|
@ -268,6 +268,8 @@ List<ClassAPI> generate_c_api_classes() {
|
|||||||
method_api.method_name = method_api.method_name.get_slice(":", 0);
|
method_api.method_name = method_api.method_name.get_slice(":", 0);
|
||||||
} else if (m->get().return_val.type != Variant::NIL) {
|
} 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);
|
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 {
|
} else {
|
||||||
method_api.return_type = "void";
|
method_api.return_type = "void";
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user