UnityGame/Library/PackageCache/com.unity.test-framework/UnityEditor.TestRunner/TestRun/WaitForPlayerRunTask.cs
2024-10-27 10:53:47 +03:00

23 lines
693 B
C#

using System.Collections;
using UnityEditor.TestRunner.TestLaunchers;
using UnityEditor.TestTools.TestRunner.TestRun.Tasks;
namespace UnityEditor.TestTools.TestRunner.TestRun
{
internal class WaitForPlayerRunTask : TestTaskBase
{
public override IEnumerator Execute(TestJobData testJobData)
{
var playerBuildOptions = testJobData.PlayerBuildOptions;
if ((playerBuildOptions.options & BuildOptions.AutoRunPlayer) != BuildOptions.AutoRunPlayer)
{
yield break;
}
while (RemoteTestRunController.instance.isRunning)
{
yield return null;
}
}
}
}