Update UIManager.cs

优化ui操作;可能会存在ui缓存是反向的,以后注意
pull/1/head
zxl 2024-11-13 09:46:21 +08:00
parent 0d63e5482f
commit d106f7eebb
1 changed files with 16 additions and 0 deletions

View File

@ -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;
}