mirror of
https://github.com/ConjureETS/MTI860_VR_Multi_Controller.git
synced 2026-03-24 04:21:15 +00:00
22 lines
514 B
C#
22 lines
514 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.XR;
|
|
|
|
public class OmniService
|
|
{
|
|
public static bool isPresent()
|
|
{
|
|
var xrDisplaySubsystems = new List<XRDisplaySubsystem>();
|
|
SubsystemManager.GetInstances<XRDisplaySubsystem>(xrDisplaySubsystems);
|
|
foreach (var xrDisplay in xrDisplaySubsystems)
|
|
{
|
|
if (xrDisplay.running)
|
|
{
|
|
return true;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
}
|