mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-14 16:51:28 +00:00
UIWindow同一帧关闭导致GameObject无法销毁的极小概率bug修复
This commit is contained in:
@@ -226,6 +226,7 @@ namespace TEngine
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
internal bool IsLoadDone = false;
|
internal bool IsLoadDone = false;
|
||||||
|
|
||||||
|
internal bool IsDestroyed = false;
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
public void Init(string name, int layer, bool fullScreen, string assetName, bool fromResources, int hideTimeToClose)
|
public void Init(string name, int layer, bool fullScreen, string assetName, bool fromResources, int hideTimeToClose)
|
||||||
@@ -395,6 +396,8 @@ namespace TEngine
|
|||||||
_panel = null;
|
_panel = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
IsDestroyed = true;
|
||||||
|
|
||||||
if (!isShutDown)
|
if (!isShutDown)
|
||||||
{
|
{
|
||||||
CancelHideToCloseTimer();
|
CancelHideToCloseTimer();
|
||||||
@@ -414,6 +417,12 @@ namespace TEngine
|
|||||||
|
|
||||||
IsLoadDone = true;
|
IsLoadDone = true;
|
||||||
|
|
||||||
|
if (IsDestroyed)
|
||||||
|
{
|
||||||
|
Object.Destroy(panel);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
panel.name = GetType().Name;
|
panel.name = GetType().Name;
|
||||||
_panel = panel;
|
_panel = panel;
|
||||||
_panel.transform.localPosition = Vector3.zero;
|
_panel.transform.localPosition = Vector3.zero;
|
||||||
|
Reference in New Issue
Block a user