il2cpp build error

I’m using AssimpNet which causes my Android build to fail with il2cpp. The problem seems to be caused by the post-build step of AssempNet.dll where it gets IL patched using Mono.Cecil which I’m not very familiar with.

Attached are the Unity logs.

3462745–274724–log1.txt (5.29 KB)
3462745–274725–log2.txt (2.74 KB)

It looks like this error happens when IL2CPP encounters the Mkrefany IL opcode, which IL2CPP does not support. I’m not sure what AssimpNet is doing to the IL, but it might worth looking through the patched code (maybe using ildasm) for the Mkrefany opcode.

I used ildasm to dump to the patched DLL to a txt file and found no mention of Mkrefany if this is the correct way to look for it.
The patching program source code is all given by this c# file

Yes, that is the correct way to look at it. I’m not sure what is causing this now. Can you submit a bug report? We can investigate more.

Did anything ever come of this? We are running into similar issues trying to integrate AssimpNet into Unity 2018.1.9f2.

No, I don’t believe we got a bug report about this issue. If you are able to submit one, we will investigate it.