private IEnumerator DestoryOtherWindowCor() { yield return(new WaitForEndOfFrame()); for (int i = 0; i < removedKey.Count; i++) { UIWindowBase window = allWindows[removedKey[i]]; window.DestroyWindow(); allWindows.Remove(removedKey[i]); } }
public void CloseAllWindow() { if (allWindows != null) { foreach (KeyValuePair <int, UIWindowBase> window in allWindows) { UIWindowBase baseWindow = window.Value; UIWindowData windowData = baseWindow.windowData; // 自定义窗口自己处理 if (windowData.windowType == UIWindowType.Custom) { continue; } baseWindow.DestroyWindow(); } } if (uiNormalWindowRoot.childCount > 0) { uiNormalWindowRoot.DestroyChildren(); } if (uiPopUpWindowRoot.childCount > 0) { uiPopUpWindowRoot.DestroyChildren(); } if (uiFixedWidowRoot.childCount > 0) { uiFixedWidowRoot.DestroyChildren(); } InitWindowManager(); curShownWindow = null; lastShownWindow = null; }