using System.Collections; using System.Collections.Generic; using Unity.VisualScripting; using UnityEngine; using UnityEngine.EventSystems; public class HiddenView : MonoBehaviour,IPointerClickHandler { public List hideObjects; public GameObject hideObjectParent; public List showObjects; public void OnPointerClick(PointerEventData eventData) { if (CameraMove.isStaticMove) { return; } foreach (GameObject obj in hideObjects) { obj.SetActive(false); } if (hideObjectParent != null) { foreach (Transform child in hideObjectParent.transform) { child.gameObject.SetActive(false); } } foreach (GameObject obj in showObjects) { obj.SetActive(true); } } }