This commit is contained in:
ALEXTANGXIAO
2024-09-20 22:43:08 +08:00
parent 3ac6977f93
commit 4b178a9fa9
2 changed files with 9 additions and 5 deletions

View File

@@ -101,7 +101,7 @@ namespace TEngine
_errorLogger.Dispose();
_errorLogger = null;
}
CloseAll();
CloseAll(isShutDown:true);
if (m_InstanceRoot != null && m_InstanceRoot.parent != null)
{
Destroy(m_InstanceRoot.parent.gameObject);
@@ -393,12 +393,12 @@ namespace TEngine
/// <summary>
/// 关闭所有窗口。
/// </summary>
public void CloseAll()
public void CloseAll(bool isShutDown = false)
{
for (int i = 0; i < _stack.Count; i++)
{
UIWindow window = _stack[i];
window.InternalDestroy();
window.InternalDestroy(isShutDown);
}
_stack.Clear();

View File

@@ -370,7 +370,7 @@ namespace TEngine
return needUpdate;
}
internal void InternalDestroy()
internal void InternalDestroy(bool isShutDown = false)
{
_isCreate = false;
@@ -394,8 +394,12 @@ namespace TEngine
Object.Destroy(_panel);
_panel = null;
}
if (!isShutDown)
{
CancelHideToCloseTimer();
}
}
/// <summary>
/// 处理资源加载完成回调。