/* プラグイン内部用API */ public static void SetEventCallback(CriAtomExSequencer.EventCbFunc func, string separator) { #if CRIWARE_SUPPORT_NATIVE_CALLBACK /* ネイティブプラグインに関数ポインタを登録 */ IntPtr ptr = IntPtr.Zero; eventUserCbFunc = func; if (func != null) { CriAtomExSequencer.EventCbFunc delegateObject; delegateObject = new CriAtomExSequencer.EventCbFunc(CriAtom.SequenceEventCallbackFromNative); ptr = Marshal.GetFunctionPointerForDelegate(delegateObject); } CriAtomPlugin.criAtomUnitySequencer_SetEventCallback(ptr, separator); #else Debug.LogError("[CRIWARE] Event callback is not supported for this scripting backend."); #endif }