I’m having an issue when using the FMOD callback function for iOS. I get the following error:
Unhandled Exception: System.NotSupportedException: IL2CPP does not support marshaling delegates that point to instance methods to native code.
at FMOD.Studio.EventInstance.setCallback (FMOD.Studio.EVENT_CALLBACK callback, EVENT_CALLBACK_TYPE callbackmask) [0x00000] in :0
UnityEngine.UnhandledExceptionHandler:PrintException(String, Exception)
UnityEngine.UnhandledExceptionHandler:HandleUnhandledException(Object, UnhandledExceptionEventArgs)
The code used in Unity (JS) is as follows and works fine in Unity Editor:
var cb: FMOD.Studio.EVENT_CALLBACK;