Browse Source

Fix script documentation method argument default values

Co-Authored-By: Rémi Verschelde <[email protected]>
Xwdit 3 years ago
parent
commit
f265f175e3
1 changed files with 3 additions and 1 deletions
  1. 3 1
      modules/gdscript/gdscript.cpp

+ 3 - 1
modules/gdscript/gdscript.cpp

@@ -290,7 +290,9 @@ void GDScript::_get_script_method_list(List<MethodInfo> *r_list, bool p_include_
 #endif
 				mi.arguments.push_back(arginfo);
 			}
-
+#ifdef TOOLS_ENABLED
+			mi.default_arguments.append_array(func->get_default_arg_values());
+#endif
 			mi.return_val = func->get_return_type();
 			r_list->push_back(mi);
 		}