public virtual void Setup() { m_PreviousWorld = World.DefaultGameObjectInjectionWorld; World = World.DefaultGameObjectInjectionWorld = new World("Test World"); m_Manager = World.EntityManager; m_ManagerDebug = new EntityManager.EntityManagerDebug(m_Manager); }
public virtual void Setup() { // Redirect Log messages in NUnit which get swallowed (from GC invoking destructor in some cases) // System.Console.SetOut(NUnit.Framework.TestContext.Out); m_PreviousWorld = World.DefaultGameObjectInjectionWorld; #if !UNITY_DOTSPLAYER World = World.DefaultGameObjectInjectionWorld = new World("Test World"); #else Unity.Burst.DotsRuntimeInitStatics.Init(); World = DefaultTinyWorldInitialization.Initialize("Test World"); #endif m_Manager = World.EntityManager; m_ManagerDebug = new EntityManager.EntityManagerDebug(m_Manager); _systems.Clear(); #if !UNITY_DOTSPLAYER #if !UNITY_2019_2_OR_NEWER // Not raising exceptions can easily bring unity down with massive logging when tests fail. // From Unity 2019.2 on this field is always implicitly true and therefore removed. UnityEngine.Assertions.Assert.raiseExceptions = true; #endif // #if !UNITY_2019_2_OR_NEWER #endif // #if !UNITY_DOTSPLAYER }
public virtual void Setup() { _previousWorld = World.Active; _world = World.Active = new World("Test World"); _entityManager = _world.GetOrCreateManager <EntityManager>(); _managerDebug = new EntityManager.EntityManagerDebug(_entityManager); }
public virtual void SetUp() { previousWorld = World.DefaultGameObjectInjectionWorld; world = World.DefaultGameObjectInjectionWorld = new World("Test World"); manager = world.EntityManager; managerDebug = new EntityManager.EntityManagerDebug(manager); }
public virtual void SetUp() { PreviousWorld = World.Active; World = World.Active = new World("Test World"); EntityManager = World.EntityManager; ManagerDebug = new EntityManager.EntityManagerDebug(EntityManager); }
public virtual void Setup() { m_PreviousWorld = World.Active; World = World.Active = new World("Test World"); m_Manager = World.GetOrCreateManager <EntityManager>(); m_ManagerDebug = new EntityManager.EntityManagerDebug(m_Manager); }
public virtual void Setup() { m_PreviousWorld = World.DefaultGameObjectInjectionWorld; World = World.DefaultGameObjectInjectionWorld = new World("Test World"); m_Manager = World.EntityManager; m_ManagerDebug = new EntityManager.EntityManagerDebug(m_Manager); World.GetOrCreateSystem <EntityForEachSystem>(); }
protected virtual void SetUp() { World = new World("Test World"); m_Manager = World.EntityManager; m_ManagerDebug = new EntityManager.EntityManagerDebug(m_Manager); m_AnimationGraphSystem = World.GetOrCreateSystem <PreAnimationGraphSystem>(); m_AnimationGraphSystem.AddRef(); }
public virtual void Setup() { // Redirect Log messages in NUnit which get swallowed (from GC invoking destructor in some cases) // System.Console.SetOut(NUnit.Framework.TestContext.Out); m_PreviousWorld = World.DefaultGameObjectInjectionWorld; World = World.DefaultGameObjectInjectionWorld = new World("Test World"); m_Manager = World.EntityManager; m_ManagerDebug = new EntityManager.EntityManagerDebug(m_Manager); }
protected virtual void SetUp() { _previousWorld = World.Active; _world = World.Active = new World("ECS Test World"); _manager = _world.EntityManager; _managerDebug = new EntityManager.EntityManagerDebug(_manager); UnityEngine.Assertions.Assert.raiseExceptions = true; }
public virtual void Setup() { m_PreviousWorld = World.DefaultGameObjectInjectionWorld; World = World.DefaultGameObjectInjectionWorld = new World("Test World"); m_Manager = World.EntityManager; m_ManagerDebug = new EntityManager.EntityManagerDebug(m_Manager); #if !UNITY_DOTSPLAYER // Many ECS tests will only pass if the Jobs Debugger enabled; // force it enabled for all tests, and restore the original value at teardown. JobsDebuggerWasEnabled = JobsUtility.JobDebuggerEnabled; JobsUtility.JobDebuggerEnabled = true; #endif }
public virtual void Setup() { m_PreviousWorld = World.Active; World = World.Active = new World("Test World"); m_Manager = World.GetOrCreateManager <EntityManager>(); m_ManagerDebug = new EntityManager.EntityManagerDebug(m_Manager); // not raising exceptions can easily bring unity down with massive logging, // when tests fail. UnityEngine.Assertions.Assert.raiseExceptions = true; }
public virtual void Setup() { PreviousWorld = World.DefaultGameObjectInjectionWorld; World = World.DefaultGameObjectInjectionWorld = new World("Test World"); EntityManager = World.EntityManager; EntityManagerDebug = new EntityManager.EntityManagerDebug(EntityManager); World.GetOrCreateSystem <BeginInitializationEntityCommandBufferSystem>(); World.GetOrCreateSystem <EndInitializationEntityCommandBufferSystem>(); World.GetOrCreateSystem <BeginSimulationEntityCommandBufferSystem>(); World.GetOrCreateSystem <EndSimulationEntityCommandBufferSystem>(); World.GetOrCreateSystem <BeginPresentationEntityCommandBufferSystem>(); }
public virtual void Setup() { m_PreviousWorld = World.Active; World = World.Active = new World("Test World"); m_Manager = World.GetOrCreateManager <EntityManager>(); m_ManagerDebug = new EntityManager.EntityManagerDebug(m_Manager); #if !UNITY_2019_2_OR_NEWER // Not raising exceptions can easily bring unity down with massive logging when tests fail. // From Unity 2019.2 on this field is always implicitly true and therefore removed. UnityEngine.Assertions.Assert.raiseExceptions = true; #endif }
public void Setup() { m_PreviousWorld = World.DefaultGameObjectInjectionWorld; const string kTestWorldName = "Test World"; #if UNITY_DOTSPLAYER // Tiny always runs outside of process from the Editor, as such we need to // invoke the tiny bootstrapping for worlds manually World = DefaultWorldInitialization.Initialize(kTestWorldName); #else World = World.DefaultGameObjectInjectionWorld = new World(kTestWorldName); #endif m_Manager = World.EntityManager; m_ManagerDebug = new EntityManager.EntityManagerDebug(m_Manager); }
public virtual void Setup() { #if !UNITY_DOTSRUNTIME // unit tests preserve the current player loop to restore later, and start from a blank slate. m_PreviousPlayerLoop = PlayerLoop.GetCurrentPlayerLoop(); PlayerLoop.SetPlayerLoop(PlayerLoop.GetDefaultPlayerLoop()); #endif m_PreviousWorld = World.DefaultGameObjectInjectionWorld; World = World.DefaultGameObjectInjectionWorld = new World("Test World"); m_Manager = World.EntityManager; m_ManagerDebug = new EntityManager.EntityManagerDebug(m_Manager); // Many ECS tests will only pass if the Jobs Debugger enabled; // force it enabled for all tests, and restore the original value at teardown. JobsDebuggerWasEnabled = JobsUtility.JobDebuggerEnabled; JobsUtility.JobDebuggerEnabled = true; }
public virtual void Setup() { m_PreviousWorld = World.Active; #if !UNITY_DOTSPLAYER World = World.Active = new World("Test World"); #else World = DefaultTinyWorldInitialization.Initialize("Test World"); #endif m_Manager = World.EntityManager; m_ManagerDebug = new EntityManager.EntityManagerDebug(m_Manager); #if !UNITY_DOTSPLAYER #if !UNITY_2019_2_OR_NEWER // Not raising exceptions can easily bring unity down with massive logging when tests fail. // From Unity 2019.2 on this field is always implicitly true and therefore removed. UnityEngine.Assertions.Assert.raiseExceptions = true; #endif // #if !UNITY_2019_2_OR_NEWER #endif // #if !UNITY_DOTSPLAYER }