public void closeMenu(bool hasAudio = false) { if (hasAudio) { AudioSources.instance.PlaySound(applySelectionFxId); } menuInGame.gameObject.GetComponent <InGameMenu>().isConfirmExit = false; inGame.closeExitMenu(); //menuInGame.gameObject.GetComponent<InGameMenu>().confirmExit.gameObject.SetActive(false); menuInGame.gameObject.SetActive(false); Time.timeScale = 1.0F; isMenu = false; }