public void ToggleInventoryUI() { if (inventoryUI != null) { inventoryUI.SetActive(!inventoryUI.activeSelf); gameManagerMaster.isInventoryUIOn = !gameManagerMaster.isInventoryUIOn; gameManagerMaster.CallEventInventoryUIToggle(); } }
// all the pausing, freeing screen will happen automatically public void ToggleInventoryUI() { if (inventoryUI != null) { inventoryUI.SetActive(!inventoryUI.activeSelf); // set the Inventory to the opposite of whatever state is in gameManagerMaster.isInventoryUIOn = !gameManagerMaster.isInventoryUIOn; gameManagerMaster.CallEventInventoryUIToggle(); } }