Doesn't work with IL2CPP
Sadly this approach isn't working anymore with unity's il2cpp compiler. So it seems like the only remaining option is unity's SendMessage, which is just a pain in the ass?
NotSupportedException: IL2CPP does not support marshaling delegates that point to instance methods to native code. at UnityPlugin.Awake () [0x00000] in
:0
Will this help?
https://answers.unity.com/questions/1229036/callbacks-from-c-to-c-are-not-working-in-540f3.html
Yep, for anyone else reading this, the solution is to make your C# callback delegate methods static.
so sad, I just want to pass a non-static c# callback to c++, but it can't