PanelSimpleCasual.cs 509 B

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