ExitToMenu()

public void ExitToMenu()
    {
        try
        {
            AudioManager.MasterMixer.UnMuffleMusic();
        }
        catch
        {
            string filePath = "";

            Exception ex = new();

            using (System.IO.StreamWriter writer = new System.IO.StreamWriter(filePath, true))
            {
                writer.WriteLine();
                writer.WriteLine();
                writer.WriteLine();

                while (ex != null)
                {
                    writer.WriteLine();
                    writer.WriteLine();
                    writer.WriteLine();

                    ex = ex.InnerException;
                }
            }
            // Will revisit error handling
        }
        SceneManager.LoadScene("Title Scene");

        postGamePanel.SetActive(false);
        if (titlePanel != null & !titlePanel.activeSelf) titlePanel.SetActive(true);
    }


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *