public static void SetupDispatcher() { if (singleton == null) { GameObject go = new GameObject(); go.transform.name = "MIDIUnified Dispatcher"; singleton = go.AddComponent <MidiDispatcher> (); } }
void OnDestroy() { singleton = null; }
void OnEnable() { singleton = this; }
void Awake() { singleton = this; }
public static void NoteDispatch(int aNoteIndex, float aDuration, float aDelay = 0f, int aVolume = 80, int aChannel = 0, Action started = null, Action finished = null) { MidiDispatcher.DispatchNote(aNoteIndex, aVolume, aChannel, aDuration, aDelay, started, finished); }