using System.Collections; using System.Collections.Generic; using UnityEngine; public class UIController : MonoBehaviour { [SerializeField] private List _panels = new List(); public void ShowMenu() { _panels.ForEach(x => x.SetActive(true)); } public void HideMenu() { _panels.ForEach(x => x.SetActive(false)); } }