Files
2026-05-26 16:15:54 +08:00

25 lines
504 B
C#

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($"<color=red>{e.Message}\n{e.StackTrace}</color>");
}
}
}