public UIWindow Backward() { if (TopWindow != null && TopWindow != RootWindow) { DestroyWindow(TopWindow); TopWindow.Reshow(); return(TopWindow); } return(null); }
void DestroyWindow(UIWindow layer) { if (!m_dictWindows.ContainsKey(layer.name)) { Debug.LogWarning("Try to destroy an unexist layer!"); } m_dictWindows.Remove(layer.name); m_listWindows.Remove(layer); layer.Destroy(); Object.DestroyImmediate(layer.gameObject); if (TopWindow != null) { TopWindow.Reshow(); } }