public void InitWinSelectMidi(int selected, Action <object, int> select) { // Get existing open window or if none, make a new one: try { winSelectMidi = EditorWindow.GetWindow <SelectMidiWindow>(true, "Select a Midi File"); winSelectMidi.SelectWindow = winSelectMidi; //SelectMidiWindow.SelectWindow = winSelectMidi; winSelectMidi.OnSelect = select; winSelectMidi.SelectedItem = selected; winSelectMidi.BackgroundColor = new Color(.8f, .8f, .8f, 1f); } catch (System.Exception ex) { MidiPlayerGlobal.ErrorDetail(ex); } }