Exemple #1
0
        protected virtual void TearDown()
        {
            if (_manager != null)
            {
                while (_world.Systems.Any())
                {
                    _world.DestroySystem(_world.Systems.First());
                }

                _managerDebug.CheckInternalConsistency();

                _world.Dispose();
                _world = null;

                World.Active   = _previousWorld;
                _previousWorld = null;
                _manager       = null;
            }
        }
        public virtual void TearDown()
        {
            if (m_Manager != null && m_Manager.IsCreated)
            {
                // Clean up systems before calling CheckInternalConsistency because we might have filters etc
                // holding on SharedComponentData making checks fail
                while (World.Systems.ToArray().Length > 0)
                {
                    World.DestroySystem(World.Systems.ToArray()[0]);
                }

                m_ManagerDebug.CheckInternalConsistency();

                World.Dispose();
                World = null;

                World.Active    = m_PreviousWorld;
                m_PreviousWorld = null;
                m_Manager       = null;
            }
        }