Toggle GameObject Visibility - Unity
23 October 2020
if(gameObject.activeSelf){
gameObject.SetActive(false);
}else{
gameObject.SetActive(true);
}if(gameObject.activeSelf){
gameObject.SetActive(false);
}else{
gameObject.SetActive(true);
}