Files
2025TapTapGameJam/Assets/Script/Core/UI/UILayerRoot.cs

25 lines
471 B
C#
Raw Normal View History

using System;
using UnityEngine;
namespace Core
{
// 挂在 NormalCanvas 上的脚本
public class UILayerRoot : MonoBehaviour
{
public UILayer layer;
void Awake()
{
if (UIManager.Instance != null)
{
UIManager.Instance.RegisterLayer(layer, transform);
}
}
private void OnDestroy()
{
UIManager.Instance.UnRegisterLayer(layer);
}
}
}