using System; using System.Collections; using System.Collections.Generic; using System.Linq; using TMPro; using Unity.VisualScripting; using UnityEngine; using UnityEngine.EventSystems; using UnityEngine.UI; public class LocalVideoAlarmUI : MonoBehaviour, IPointerClickHandler { public TextMeshProUGUI textMeshPro; public LocalVideoAlarm localVideoAlarm; public Image expand_image; public Button close_bt; public GameObject preform; public RectTransform Content; public Canvas canvas; // Start is called before the first frame update void Start() { } // Update is called once per frame void Update() { } public void OnPointerClick(PointerEventData eventData) { if (Menu.M_全景监控_摄像头 != CabinetUIManager.Instance.current_menu) return; GameObject go; if (canvas.transform.childCount != 0) { DestroyImmediate(canvas.transform.GetChild(0).gameObject); } go = Instantiate(expand_image.gameObject); go.transform.SetParent(canvas.transform); go.transform.rotation = Quaternion.identity; close_bt = canvas.transform.GetChild(0).Find("关闭").GetComponent