Unity升级2021后发包 会出现格式转化问题

报错例子
1.Non-fatal Exception: java.lang.Exception FormatException : Input string was not in a correct format.

2.Non-fatal Exception: java.lang.ExceptionFormatException : String was not recognized as a valid DateTime.

电脑上运行没问题,线上包统计有报错

原因:不同国家
System.Globalization.CultureInfo.DefaultThreadCurrentCulture = new System.Globalization.CultureInfo(“en-US”);
System.Globalization.CultureInfo.DefaultThreadCurrentUICulture = new System.Globalization.CultureInfo(“en-US”);

猜你喜欢

转载自blog.csdn.net/qq_42980269/article/details/126938883
今日推荐