using System.Collections; using System.Collections.Generic; using UnityEngine; public class Canvas : MonoBehaviour { public GameObject[] objs; public void onclick() { foreach (GameObject obj in objs) { if(obj) obj.SetActive(false); } } }