private void Update()
 {
     if (GlobalInputManager.instance.GetButtonDown(0, TUF.Inputs.Action.Cancel))
     {
         gameObject.SetActive(false);
         OnMenuExited?.Invoke();
     }
 }
 private void Update()
 {
     if (GlobalInputManager.instance.GetButtonDown(0, TUF.Inputs.Action.Cancel))
     {
         if (EventSystem.current.currentSelectedGameObject?.GetComponent <TMPro.TMP_InputField>())
         {
             return;
         }
         if (GameManager.current.modBrowser.gameObject.activeInHierarchy)
         {
             GameManager.current.modBrowser.gameObject.SetActive(false);
             mainMenu.SetActive(true);
             return;
         }
         if (manageModsMenu.activeInHierarchy)
         {
             mainMenu.SetActive(true);
             manageModsMenu.SetActive(false);
             return;
         }
         gameObject.SetActive(false);
         OnMenuExited?.Invoke();
     }
 }