public override void Exit()
    {
        base.Exit();

        ChartEditor editor = ChartEditor.Instance;

        editor.StopAudio();

        if (selectedBeforePlay.Count > 0)
        {
            // Check if the user switched view modes while playing
            if (Globals.viewMode == Globals.ViewMode.Chart)
            {
                if (selectedBeforePlay[0].GetType().IsSubclassOf(typeof(ChartObject)))
                {
                    editor.selectedObjectsManager.currentSelectedObjects = selectedBeforePlay;
                }
            }
            else
            {
                if (!selectedBeforePlay[0].GetType().IsSubclassOf(typeof(ChartObject)))
                {
                    editor.selectedObjectsManager.currentSelectedObjects = selectedBeforePlay;
                }
            }
        }

        selectedBeforePlay.Clear();

        if (resetBackToTimeOnStop.HasValue)
        {
            editor.movement.SetTime(resetBackToTimeOnStop.Value);
        }
    }