private void OnMatchUnpaused()
    {
        if (!m_Paused)
        {
            return;
        }

        if (m_InGameOptions)
        {
            m_InGameOptions = false;

            // Unregister from events.

            if (m_InGameOptionsPanel != null)
            {
                m_InGameOptionsPanel.onBackEvent -= OnOptionsBack;
            }

            // Save game settings.

            GameSettings.SaveMain();
        }

        m_Paused            = false;
        m_MatchJustUnpaused = true;

        // Inhibit input.

        if (m_MatchController != null)
        {
            m_MatchController.InhibitInput();
        }

        // Reset time scale.

        if (m_TrueSyncManager != null)
        {
            m_TrueSyncManager.ForceTimeScale(m_TimeScale_Cached);
        }

        // Clear audio mixer snapshot.

        AudioMixerManager.RemoveMain(m_SnapshotPause);

        // Unregister from events.

        if (m_PauseMenuPanel != null)
        {
            m_PauseMenuPanel.onResumeEvent  -= OnPauseResumeSelected;
            m_PauseMenuPanel.onOptionsEvent -= OnPauseOptionsSelected;
            m_PauseMenuPanel.onRestartEvent -= OnPauseRestartSelected;
            m_PauseMenuPanel.onExitEvent    -= OnPauseExitSelected;
        }

        // Close panels.

        ClearGroup(UIGroup.Group3);
    }
        public override void OnEnter()
        {
            if (!defaultSnapshot.IsNone && defaultSnapshot.Value != null)
            {
                AudioMixerManager.RemoveMain((AudioMixerSnapshot)defaultSnapshot.Value);
            }

            Finish();
        }
 public override void OnExit()
 {
     if (popOnExit)
     {
         if (!snapshot.IsNone && snapshot.Value != null)
         {
             AudioMixerManager.RemoveMain((AudioMixerSnapshot)snapshot.Value);
         }
     }
 }