isDeviceActive
Read-only value that can be used to determine if the XR device is active.
Read time 1 minuteLast updated 11 days ago
Definition
- Type: Property
- Namespace: UnityEngine.XR
- Assembly: UnityEngine.VRModule
public static bool isDeviceActive { get; }
Remarks
When true, Unity accepts input from the device and attempts to render to the device's display or displays. Note that this returns true even if the device isn't currently rendering due to lack of user presence (refer to CommonUsages.userPresence). This can become false if a device is disconnected, wasn't initialized (refer to SubsystemManager to find a display subsystem descriptor and create the subsystem from it), or the XR display subsystem is stopped.
XR output is automatically mirrored to the main display (if applicable). This can be controlled with XRSettings.showDeviceView.
The main window is still controlled by Screen and related APIs.