rabidus-test/Assets/Scripts/ActivateAllDisplays.cs

24 lines
556 B
C#
Raw Permalink Normal View History

2023-07-25 12:23:15 +03:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ActivateAllDisplays : MonoBehaviour
{
private void Start()
{
Screen.sleepTimeout = SleepTimeout.NeverSleep;
2023-07-25 12:23:15 +03:00
Debug.Log("displays connected: " + Display.displays.Length);
for (int i = 1; i < Display.displays.Length; i++)
{
Display.displays[i].Activate();
}
}
2023-09-11 15:44:17 +03:00
[ContextMenu("Debug")]
private void NextDisplay()
{
Debug.Log($"CurrentScreen: {Display.displays.Length}");
}
2023-07-25 12:23:15 +03:00
}