playtest-unity/playtest/Library/PackageCache/com.unity.test-framework@1..../UnityEditor.TestRunner/TestLaunchers/EditModeLauncherContextSett...

32 lines
734 B
C#
Raw Permalink Normal View History

2023-06-21 13:28:15 -04:00
using System;
using UnityEngine;
namespace UnityEditor.TestTools.TestRunner
{
internal class EditModeLauncherContextSettings : IDisposable
{
private bool m_RunInBackground;
public EditModeLauncherContextSettings()
{
SetupProjectParameters();
}
public void Dispose()
{
CleanupProjectParameters();
}
private void SetupProjectParameters()
{
m_RunInBackground = Application.runInBackground;
Application.runInBackground = true;
}
private void CleanupProjectParameters()
{
Application.runInBackground = m_RunInBackground;
}
}
}