Version: 2019.4
public static bool isPresent ;

説明

Successfully detected a XR device in working order.

This property has been deprecated and will be removed in a future release.

Instead, try to retrieve the XRDisplaySubsystem to see if it is running, as the example below illustrates.

using System;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.XR;
internal static class ExampleUtil
{
    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;
    }
}
public class CheckXRDisplay : MonoBehaviour
{
    void Awake()
    {
        Debug.Log("Do we have an Active Display? " + ExampleUtil.isPresent().ToString());
    }
}