public override IEnumerator LoadScenes([ValueSource(nameof(GetHelloWorldScene))] string scenePath) { // Log warnings instead of creating dialog boxes if authentication fails if (m_suppressDialogs) { PlayerPrefs.SetInt("Havok.Auth.SuppressDialogs", 1); } else { PlayerPrefs.DeleteKey("Havok.Auth.SuppressDialogs"); } // Ensure Havok var world = World.DefaultGameObjectInjectionWorld; var system = world.GetOrCreateSystem <EnsureHavokSystem>(); EnsureHavokSystem.EnsureHavok(system); SceneManager.LoadScene(scenePath); yield return(new WaitForSeconds(1)); UnityPhysicsSamplesTest.ResetDefaultWorld(); yield return(new WaitForFixedUpdate()); LogAssert.NoUnexpectedReceived(); m_NumTestsRun++; PlayerPrefs.DeleteKey("Havok.Auth.SuppressDialogs"); }
private IEnumerator SetupAndLoadScene(World world, HavokConfiguration havokConfig, string scenePath) { var system = world.GetOrCreateSystem <EnsureHavokSystem>(); system.Enabled = true; system.EntityManager.CreateEntity(new ComponentType[] { typeof(HavokConfiguration) }); system.SetSingleton <HavokConfiguration>(havokConfig); SceneManager.LoadScene(scenePath); yield return(new WaitForSeconds(1)); UnityPhysicsSamplesTest.ResetDefaultWorld(); yield return(new WaitForFixedUpdate()); }