PanelView.cs 452 B

12345678910111213141516171819
  1. using UnityEngine;
  2. namespace LayerLab.CasualGame
  3. {
  4. public class PanelView : MonoBehaviour
  5. {
  6. [SerializeField] private GameObject[] otherPanels;
  7. public void OnEnable()
  8. {
  9. for (int i = 0; i < otherPanels.Length; i++) otherPanels[i].SetActive(true);
  10. }
  11. public void OnDisable()
  12. {
  13. for (int i = 0; i < otherPanels.Length; i++) otherPanels[i].SetActive(false);
  14. }
  15. }
  16. }