static void InitWindow()
    {
        // Get existing open window or if none, make a new one:
        TerminalDialog.currentScene = UnityEditor.SceneManagement.EditorSceneManager.GetActiveScene();
        TerminalDialog window = (TerminalDialog)EditorWindow.GetWindow(typeof(TerminalDialog));

        window.Show();
    }
    static void CloseWindow()
    {
        TerminalDialog window = (TerminalDialog)EditorWindow.GetWindow(typeof(TerminalDialog));

        window.Close();
    }
 static void onSceneOpen(UnityEngine.SceneManagement.Scene scene, UnityEditor.SceneManagement.OpenSceneMode mode)
 {
     TerminalDialog.CloseWindow();
 }