-
Notifications
You must be signed in to change notification settings - Fork 875
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unity2021 tolua生成的System_Int32Wrap文件存在编译错误 #244
Comments
大佬,请问你有解决这个问题吗 |
@topameng +1,求助 |
大佬,问下现在有解决这个问题吗? |
在ToLuaExpor的IsObsolete中加一段代码,忽略掉带有Span<>和ReadOnlySpan<>的方法 if (mb is MethodBase method)
{
ParameterInfo[] parameters = method.GetParameters();
foreach (ParameterInfo parameter in parameters)
{
Type parameterType = parameter.ParameterType;
if (parameterType.IsGenericType)
{
Type genericTypeDefinition = parameterType.GetGenericTypeDefinition();
if (genericTypeDefinition == typeof(System.Span<>) || genericTypeDefinition == typeof(System.ReadOnlySpan<>))
return true;
}
}
} |
这是来自QQ邮箱的假期自动回复邮件。您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Generate.zip
Unity版本2021.2.3f1
由于Unity2021版本中升级了mscorlib.dll的api版本
System.Int32中新增了如
public static Int32 Parse(ReadOnlySpan[char] s, NumberStyles style = NumberStyles.Integer, IFormatProvider provider = null);这样的重载方法,该重载方法的参数ReadOnlySpan[char]会导致生成wrap文件出现编译错误,具体表现为:
System.Span arg0 = StackTraits<System.Span[char]>.Check(L, 2); Span不能用作StackTraits的类型参数。
其他如System.DateTime和System.TimeSpan生成的wrap文件存在同样的问题。
The text was updated successfully, but these errors were encountered: