yyl
2026-04-03 fb0570bdb7e73e7d4dca211f365ee67b43628240
Main/Manager/UIManager.cs
@@ -384,7 +384,44 @@
        return false;
    }
    // 检查是否存在任何同层级sortingOrde大于我的窗口
    public bool ExistAnySameLevelWinHigherSortingOrder(UILayer uiLayer, string excludeUIName)
    {
        int mySortingOrder = 0;
        if (uiDict.TryGetValue(excludeUIName, out List<UIBase> excludeList) && excludeList.Count > 0)
        {
            foreach (var ui in excludeList)
            {
                if (ui.IsActive())
                {
                    mySortingOrder = ui.GetSortingOrder();
                    break;
                }
            }
        }
        if (mySortingOrder == 0)
            return false;
        foreach (var uiList in uiDict.Values)
        {
            foreach (var ui in uiList)
            {
                if (!ui.IsActive())
                    continue;
                if (ui.uiName == excludeUIName)
                    continue;
                if (ui.uiLayer != uiLayer)
                    continue;
                if (ui.GetSortingOrder() > mySortingOrder)
                    return true;
            }
        }
        return false;
    }
    // 获取指定类型的所有UI实例
    public List<T> GetAllUI<T>() where T : UIBase
    {