using System; using UnityEngine; [Serializable] public struct ViewGroup { [SerializeField] GameObject[] viewGroup; public void Active() { for (int i = 0; i < viewGroup.Length; ++i) { viewGroup[i]?.SetActive(true); } } public void Deactive() { for (int i = 0; i < viewGroup.Length; ++i) { viewGroup[i]?.SetActive(false); } } }