Quantcast
Channel: Questions in topic: "il2cpp"
Viewing all articles
Browse latest Browse all 598

Callbacks from C to C# are not working in 5.4.0f3

$
0
0
Here is my simple flow of callback from ios to unity. private delegate void CallbackDelegate(); [DllImport("__Internal")] private static extern void PluginFunction(CallbackDelegate callback); void Start() { PluginFunction(CallbackMethod); } [MonoPInvokeCallback(typeof(CallbackDelegate))] void CallbackMethod() { Debug.Log("Working..."); } C side code extern "C" typedef void (*CallBackFuncP) (); extern "C" { void PluginFunction(CallBackFuncP callback) { callback(); } } I am getting this exception after upgrading to Unity 5.4.0f3 working on previous version > Blockquote NotSupportedException: IL2CPP does not support marshaling delegates that point to instance methods to native code.

Viewing all articles
Browse latest Browse all 598

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>