diff --git a/Assets/DemoGame/GameScript/Hotfix/UI/UIManager.cs b/Assets/DemoGame/GameScript/Hotfix/UI/UIManager.cs index bdce569..709a924 100644 --- a/Assets/DemoGame/GameScript/Hotfix/UI/UIManager.cs +++ b/Assets/DemoGame/GameScript/Hotfix/UI/UIManager.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Linq; using TMPro; using UnityEngine; @@ -135,6 +136,21 @@ namespace ZC uiBase.OnClose(); // TODO: _uis.Pop(); + var array = _uis.ToList(); + foreach (var ui in array) + { + if (ui == uiBase) + { + array.Remove(ui); + } + } + + _uis.Clear(); + foreach (var ui in array) + { + _uis.Push(ui); + } + return true; }