hch
2025-09-15 5119041cf7042a6681c4df44437b282472733d77
Main/Manager/UIManager.cs
@@ -481,8 +481,17 @@
    private UIBase LoadUIResource(string uiName)
    {
        // 从资源管理器加载UI预制体
        GameObject prefab = ResManager.Instance.LoadAsset<GameObject>("UI", uiName);
        GameObject prefab;
        if (uiName == "LaunchWin")
        {
            prefab = BuiltInLoader.LoadPrefab(uiName);
        }
        else
        {
            prefab = ResManager.Instance.LoadAsset<GameObject>("UI", uiName);
        }
        // 检查预制体是否加载成功
        if (prefab == null)
@@ -690,7 +699,14 @@
        }
        // 添加到UI列表
        uiDict[uiName].Add(returnValue);
#if UNITY_EDITOR
        if (uiDict[uiName].Count > 5)
        {
            Debug.LogError("已打开" + uiDict[uiName].Count + "个界面:" + uiName);
        }
#endif
        // 将UI添加到栈中
        uiStack.Push(returnValue);