static void AutoInit()
    {
        if (!MidiINPlugin.initialized)
        {
            EditorDispatcher.StartThread((a) => {
                MidiINPlugin.Init();
                MidiINPlugin.Refresh();
                EditorDispatcher.Dispatch((b) => {
                    MidiINPlugin.RestoreEditorConnections();
                    midiINInitialized = true;
                }, new { a = "" });
            }, new { a = "" });
        }
        else
        {
            midiINInitialized = true;
        }

        if (!MidiOUTPlugin.initialized)
        {
            EditorDispatcher.StartThread((a) => {
                MidiOUTPlugin.Init();
                MidiOUTPlugin.Refresh();
                EditorDispatcher.Dispatch((b) => {
                    MidiOUTPlugin.RestoreEditorConnections();
                    midiOUTInitialized = true;
                }, new { a = "" });
            }, new { a = "" });
        }
        else
        {
            midiOUTInitialized = true;
        }

        EditorApplication.update -= EditorUpdate;
        EditorApplication.update += EditorUpdate;
    }