A game about forced loneliness, made by TACStudios
1using System.Collections;
2using System.Reflection;
3
4namespace UnityEditor.TestTools.TestRunner.TestRun.Tasks
5{
6 internal class SetInteractionModeTask : TestTaskBase
7 {
8 private const string ApplicationIdleTimeKey = "ApplicationIdleTime";
9 private const string InteractionModeKey = "InteractionMode";
10 public override IEnumerator Execute(TestJobData testJobData)
11 {
12#if UNITY_2020_3_OR_NEWER
13 SetInteractionModeToNoThrottling(testJobData);
14 EditorApplication.UpdateInteractionModeSettings();
15#endif
16 yield break;
17 }
18#if UNITY_2020_3_OR_NEWER
19 private void SetInteractionModeToNoThrottling(TestJobData testJobData)
20 {
21 testJobData.UserApplicationIdleTime = EditorPrefs.GetInt(ApplicationIdleTimeKey);
22 testJobData.UserInteractionMode = EditorPrefs.GetInt(InteractionModeKey);
23 EditorPrefs.SetInt(ApplicationIdleTimeKey, 0);
24 EditorPrefs.SetInt(InteractionModeKey, 1);
25 }
26#endif
27 }
28}