summaryrefslogtreecommitdiff
path: root/tools/doc/doc_data.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/doc/doc_data.cpp')
-rw-r--r--tools/doc/doc_data.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/doc/doc_data.cpp b/tools/doc/doc_data.cpp
index d13c7ea73c..75759e7d30 100644
--- a/tools/doc/doc_data.cpp
+++ b/tools/doc/doc_data.cpp
@@ -186,8 +186,10 @@ void DocData::generate(bool p_basic_types) {
arginfo=E->get().return_val;
if (arginfo.type==Variant::NIL)
continue;
-
- method.return_type=(arginfo.hint==PROPERTY_HINT_RESOURCE_TYPE)?arginfo.hint_string:Variant::get_type_name(arginfo.type);
+ if (m && m->get_return_type()!=StringName())
+ method.return_type=m->get_return_type();
+ else
+ method.return_type=(arginfo.hint==PROPERTY_HINT_RESOURCE_TYPE)?arginfo.hint_string:Variant::get_type_name(arginfo.type);
} else {