Esempio n. 1
0
        public static void Close()
        {
            if (componentRoot != null)
            {
                componentRoot.Dispose();
                componentRoot = null;
            }

            if (componentSystem != null)
            {
                componentSystem.Dispose();
                componentSystem = null;
            }

            objectPool?.Dispose();
            objectPool = null;

            //最后执行

#if UNITY_EDITOR && !ILRuntime && ObjectView && DEFINE_HOTFIXEDITOR
            UnityEngine.Object.DestroyImmediate(Object.DisposedObjectsParent);
            Object.DisposedObjectsParent = null;

            UnityEngine.Object.DestroyImmediate(Object.ObjectsParent);
            Object.ObjectsParent = null;
#endif

            UnityEngine.Object.DestroyImmediate(Object.GameRoot);
            Object.GameRoot = null;
        }
Esempio n. 2
0
        public static void ReStart()
        {
            if (componentRoot != null)
            {
                componentRoot.Dispose();
                componentRoot = null;
            }

            if (componentSystem != null)
            {
                componentSystem.Dispose();
                componentSystem = null;
            }

            //GameStart.Start();
        }