using UnityEngine; public class ActiveToggle : MonoBehaviour { public GameObject gameObject; public void ToggleActive() { gameObject.SetActive(!gameObject.activeSelf); } public void ToggleActive(GameObject obj) { obj.SetActive(!obj.activeSelf); Debug.Log(obj.ToString() + "Set Active: " + obj.activeSelf); } }