Show:
inventoryPanel.SetActive(true);
Hide:
inventoryPanel.SetActive(false);
Toggle:
inventoryPanel.SetActive( !inventoryPanel.activeSelf );
With CanvasGroup:
CanvasGroup
group.alpha = 0f; group.interactable = false; group.blocksRaycasts = false;