2025-10-27 22:13:55 +08:00
|
|
|
using System;
|
2025-10-14 12:39:53 +08:00
|
|
|
using UnityEngine;
|
|
|
|
|
namespace Core
|
|
|
|
|
{
|
|
|
|
|
// 挂在 NormalCanvas 上的脚本
|
|
|
|
|
public class UILayerRoot : MonoBehaviour
|
|
|
|
|
{
|
|
|
|
|
public UILayer layer;
|
|
|
|
|
|
|
|
|
|
void Awake()
|
|
|
|
|
{
|
|
|
|
|
if (UIManager.Instance != null)
|
|
|
|
|
{
|
|
|
|
|
UIManager.Instance.RegisterLayer(layer, transform);
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-10-27 22:13:55 +08:00
|
|
|
|
|
|
|
|
private void OnDestroy()
|
|
|
|
|
{
|
|
|
|
|
UIManager.Instance.UnRegisterLayer(layer);
|
|
|
|
|
}
|
2025-10-14 12:39:53 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|