using UnityEngine; using UnityEngine.UI; using GameCore; using System; public class CloseSelfPanel : MonoBehaviour { [SerializeField] Button btnClose; private void Start() { btnClose.onClick.AddListener(OnClickClose); } private void OnClickClose() { try { UIManager.Instance.DestroyUI(gameObject.name); } catch (Exception e) { Debug.Log($"{e.Message}\n{e.StackTrace}"); } } }