Toggle GameObject Visibility – Unity March 2, 2021October 23, 2020 by Lucy Estela if(gameObject.activeSelf){ gameObject.SetActive(false); }else{ gameObject.SetActive(true); }