Files
ft/Client/Assets/Scripts/EventBreak/CloseSelfPanel.cs
2026-06-29 21:18:33 +08:00

25 lines
503 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);
}
public void OnClickClose()
{
try
{
UIManager.Instance.DestroyUI(gameObject.name);
}
catch (Exception e)
{
Debug.Log($"<color=red>{e.Message}\n{e.StackTrace}</color>");
}
}
}