Skip to content

Commit

Permalink
[unity] correct the defaultValue for params argument in wrapper @ctxd…
Browse files Browse the repository at this point in the history
  • Loading branch information
zombieyang committed Aug 23, 2023
1 parent 01ca0e1 commit f6e0105
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion unity/Assets/core/upm/Editor/Src/Generator/Wrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ public static ParameterGenInfo FromParameterInfo(ParameterInfo parameterInfo)
result.TypeName = Utils.RemoveRefAndToConstraintType(parameterInfo.ParameterType.GetElementType()).GetFriendlyName();
}
result.ExpectCsType = string.Format("typeof({0})", result.TypeName);//((ExpectJsType & JsValueType.NativeObject) == JsValueType.NativeObject) ? string.Format("typeof({0})", result.TypeName) : "null";
result.DefaultValue = ConvertDefaultValueToString(parameterInfo.DefaultValue, result.TypeName);
result.DefaultValue = result.IsParams ? "System.Array.Empty<" + result.TypeName + ">()" : ConvertDefaultValueToString(parameterInfo.DefaultValue, result.TypeName);
Utils.FillEnumInfo(result, parameterInfo.ParameterType);
return result;
}
Expand Down

0 comments on commit f6e0105

Please sign in to comment.