/// <summary> /// Clean the specified except. /// </summary> /// <param name="except">Except.</param> public static void Clean(WindowBase except = null, bool forceAll = false) { WindowSystem.instance.currentWindows.RemoveAll((window) => { var result = WindowSystem.instance.DestroyWindowCheckOnClean_INTERNAL(window, null, except, forceAll); if (result == true) { if (window != null) { WindowBase.DestroyImmediate(window.gameObject); } } return(result); }); WindowSystem.ResetDepth(); if (except != null) { except.SetDepth(WindowSystem.instance.GetNextDepth(except.preferences, except.workCamera.depth), WindowSystem.instance.GetNextZDepth(except.preferences)); except.OnCameraReset(); } WindowSystem.RefreshHistory(); }
/// <summary> /// Clean the specified except. /// </summary> /// <param name="except">Except.</param> public static void Clean(List <WindowBase> except, bool forceAll = false) { WindowSystem.instance.currentWindows.RemoveAll((window) => { var result = WindowSystem.instance.DestroyWindowCheckOnClean_INTERNAL(window, except, null, forceAll); if (result == true) { if (window != null) { WindowBase.DestroyImmediate(window.gameObject); } } return(result); }); WindowSystem.ResetDepth(); if (except != null) { for (int i = 0; i < except.Count; ++i) { var instance = except[i]; if (instance == null) { continue; } instance.SetDepth(WindowSystem.instance.GetNextDepth(instance.preferences, instance.workCamera.depth), WindowSystem.instance.GetNextZDepth(instance.preferences)); instance.OnCameraReset(); } } WindowSystem.RefreshHistory(); }
public static void Clean(WindowBase except = null) { WindowSystem.instance.currentWindows.RemoveAll((window) => { if (window != null) { if (except == null || window != except) { WindowBase.DestroyImmediate(window.gameObject); return(true); } return(false); } return(true); }); }
/// <summary> /// Clean the specified except. /// </summary> /// <param name="except">Except.</param> public static void Clean(List <WindowBase> except) { WindowSystem.instance.currentWindows.RemoveAll((window) => { var result = WindowSystem.instance.DestroyWindowCheckOnClean_INTERNAL(window, except, null); if (result == true) { if (window != null) { WindowBase.DestroyImmediate(window.gameObject); } } return(result); }); WindowSystem.RefreshHistory(); }
public static void Clean(List <WindowBase> except) { WindowSystem.instance.currentWindows.RemoveAll((window) => { if (window != null) { if (except == null || !except.Contains(window)) { WindowBase.DestroyImmediate(window.gameObject); return(true); } return(false); } return(true); }); WindowSystem.RefreshHistory(); }