// Update is called once per frame
    void Update()
    {
        if (FindingMatch)
        {
            fakeMatchmakingCount++;

            if (MusicObject)
            {
                if (MusicObject.GetComponent <AudioSource>().volume > 0)
                {
                    MusicObject.GetComponent <AudioSource>().volume -= 0.001f;
                }
            }
        }

        if (FoundMatch)
        {
            HeadingText.GetComponent <TextMeshProUGUI>().text = "Match Found, Prepare for Battle";
        }

        if (FoundMatch && fakeMatchmakingCount > 1150)
        {
            FadeoutPaneltoGame.SetActive(true);
        }
    }
 public void CancelMatchmaking()
 {
     QuickPlayButton.SetActive(true);
     ProfileButton.SetActive(true);
     BackButton.SetActive(true);
     HeadingText.GetComponent <TextMeshProUGUI>().text = "Choose Operation";
     FindingMatch = false;
     MusicObject.GetComponent <AudioSource>().volume = 1.0f;
 }