C#: Fix return type hint for methods.

(cherry picked from commit 51c54b03d1)
This commit is contained in:
Zae 2024-01-09 04:28:17 +08:00 committed by Rémi Verschelde
parent 63f45cd75d
commit 0b734a6371
No known key found for this signature in database
GPG Key ID: C3336907360768E1
2 changed files with 15 additions and 0 deletions

View File

@ -2346,6 +2346,8 @@ void CSharpScript::update_script_class_info(Ref<CSharpScript> p_script) {
MethodInfo mi;
mi.name = name;
mi.return_val = PropertyInfo::from_dict(method_info_dict["return_val"]);
Array params = method_info_dict["params"];
for (int j = 0; j < params.size(); j++) {

View File

@ -661,6 +661,19 @@ namespace Godot.Bridge
methodInfo.Add("name", method.Name);
var returnVal = new Collections.Dictionary()
{
{ "name", method.ReturnVal.Name },
{ "type", (int)method.ReturnVal.Type },
{ "usage", (int)method.ReturnVal.Usage }
};
if (method.ReturnVal.ClassName != null)
{
returnVal["class_name"] = method.ReturnVal.ClassName;
}
methodInfo.Add("return_val", returnVal);
var methodParams = new Collections.Array();
if (method.Arguments != null)