Unity的那些事Unity技术分享Unity2IOS

protobuf-net运行在Unity上,修复IL2CPP反射

2017-03-02  本文已影响1147人  陈凯利
C#版的protobuf-net

Unity开发中,我们可能需要用到protobuf-net这个C#实现的ProtoBuff库。

但是,protobuf-net在IL2CPP下,因为反射的一个不兼容问题,是会运行崩溃的,导致iOS下没法玩。

这时候需要对protobuf-net稍作修改,重新编译出DLL才能在Unity下完美运行。

这种修改,估计很多遇到同样问题的项目都遇过了。 分享给遇到同样困难的人,希望有帮助。

详细修改,放到GitHub的一个分支上了。

https://github.com/kingsoft-topgame/protobuf-net/commit/4eddeeb41b4e67e3ed59b11c727c73a12f48589d

上一篇 下一篇

猜你喜欢

热点阅读