private void Uninit() { CtrlManager.CloseWindow(WindowID.MenuTopBarView); CtrlManager.CloseWindow(WindowID.MenuView); CtrlManager.Clear(); GlobalObject.ReSetGameSetting(); UnityEngine.Object.DestroyImmediate(ViewTree.Instance.gameObject); UnityEngine.Object.DestroyImmediate(CameraRoot.Instance.gameObject); UnityEngine.Object.DestroyImmediate(base.gameObject); ViewTree.Instance = null; GlobalObject.Instance = null; GC.Collect(); Resources.UnloadUnusedAssets(); }