using System.Collections; using System.Collections.Generic; using UnityEngine; public class ObjShowOrHide : MonoBehaviour { public GameObject obj; public bool ison = false; void Start() { } public void ShowOrHide() { ison = !ison; if (ison) { obj.SetActive(true); } else { obj.SetActive(false); } } // Update is called once per frame void Update() { } }