Version: 2017.2

XRSettings.isDeviceActive

切换到手册
public static bool isDeviceActive ;

描述

可用于确定 XR 设备是否处于活动状态的只读值。

When true, Unity is accepting input from the HMD and rendering to the HMD's display(s). This can become false if a device is disconnected, a device could not be intialized (see XRSettings.LoadDeviceByName), or XRSettings.enabled is set to false.

XR 输出将自动镜像到主显示器(如果适用)。这可以通过 XRSettings.showDeviceView 进行控制。

主窗口仍然由 Screen 和相关 API 控制。