You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
481 B
C#
29 lines
481 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class MultiDisplayUtils : MonoBehaviour
|
|
{
|
|
|
|
public static bool IsMultiDisplay ()
|
|
{
|
|
#if (UNITY_5_6_OR_NEWER)
|
|
|
|
if (Display.displays.Length == 1)
|
|
return false;
|
|
|
|
for (int i = 1; i < Display.displays.Length; ++i) {
|
|
if (Display.displays[i].active)
|
|
return true;
|
|
}
|
|
|
|
return false;
|
|
|
|
#else
|
|
|
|
return Display.displays.Length > 1;
|
|
|
|
#endif
|
|
}
|
|
}
|