From f265f175e3043d5a92f9dc37f1a13b6c64ad7075 Mon Sep 17 00:00:00 2001 From: Xwdit Date: Tue, 12 Jul 2022 05:04:23 +0200 Subject: [PATCH] Fix script documentation method argument default values MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: RĂ©mi Verschelde --- modules/gdscript/gdscript.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/gdscript/gdscript.cpp b/modules/gdscript/gdscript.cpp index dc6bfbb0342..8a5e93eeff4 100644 --- a/modules/gdscript/gdscript.cpp +++ b/modules/gdscript/gdscript.cpp @@ -290,7 +290,9 @@ void GDScript::_get_script_method_list(List *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); }