protected override void OnEnable() { base.OnEnable(); if (reference != IntPtr.Zero) { Native.EnableSequencer(reference, true); } }
protected override void OnDisable() { base.OnDisable(); if (reference != IntPtr.Zero) { Native.EnableSequencer(reference, false); AllNotesOff(); } }
void OnEnable() { if (reference != IntPtr.Zero) { Native.EnableSequencer(reference, true); } #if UNITY_EDITOR EditorApplication.playmodeStateChanged += HandleOnPlayModeChanged; #endif }
void OnDisable() { if (reference != IntPtr.Zero) { Native.EnableSequencer(reference, false); AllNotesOff(); } #if UNITY_EDITOR EditorApplication.playmodeStateChanged -= HandleOnPlayModeChanged; #endif }