Unity 使用 Stripping Level == Use micro mscorlib 导致 MD5.Create() 返回NULL

来源:互联网 发布:mac官方壁纸 编辑:程序博客网 时间:2024/06/08 00:39

这几天在弄资源更新,昨天导出Android APK 到手机上测试,发现MD5 校验的时候一直出错,打出Log 重新导包测试发现

MD5.Create() 返回NULL  


但是在电脑上是好好的,在手机上怎么就不行了呢?

Google MD5.Create() null Unity3D 搜索后,得到答案,如果在Unity 使用 Stripping Level == Use micro mscorlib 导出APK,一大波函数被裁剪掉了,影响到了MD5.Create() 。

转自 http://blog.csdn.NET/huutu http://www.thisisgame.com.cn




我们可以用 

[html] view plain copy
 在CODE上查看代码片派生到我的代码片
  1. MD5 md5 = new MD5CryptoServiceProvider();  

来替代 MD5.Create() 。


回想起来之前Unity刚刚推出 IL2CPP 的时候也进过 代码裁剪的坑……

Unity3d IOS 64 IL2CPP迁移之 AStarPath JosnFX 错误

真是防不胜防。

0 0