public void OpenPanel() { /* This turns on a panel if (Panel != null) { Panel.SetActive(true); } */ // This toggles a panel bool isActive = Panel.activeSelf; Panel.SetActive(!isActive); }