API reference

OVRManager Class

Configuration data for Oculus virtual reality.

Member Enumerations

Enumeration XrApi

Unknown
= OVRPlugin.XrApi.Unknown
CAPI
= OVRPlugin.XrApi.CAPI
VRAPI
= OVRPlugin.XrApi.VRAPI
OpenXR
= OVRPlugin.XrApi.OpenXR

Enumeration TrackingOrigin

EyeLevel
= OVRPlugin.TrackingOrigin.EyeLevel
FloorLevel
= OVRPlugin.TrackingOrigin.FloorLevel
Stage
= OVRPlugin.TrackingOrigin.Stage

Enumeration EyeTextureFormat

Default
= OVRPlugin.EyeTextureFormat.Default
R16G16B16A16_FP
= OVRPlugin.EyeTextureFormat.R16G16B16A16_FP
R11G11B10_FP
= OVRPlugin.EyeTextureFormat.R11G11B10_FP

Enumeration FoveatedRenderingLevel

Off
= OVRPlugin.FoveatedRenderingLevel.Off
Low
= OVRPlugin.FoveatedRenderingLevel.Low
Medium
= OVRPlugin.FoveatedRenderingLevel.Medium
High
= OVRPlugin.FoveatedRenderingLevel.High
HighTop
= OVRPlugin.FoveatedRenderingLevel.HighTop

Enumeration FixedFoveatedRenderingLevel

Off
= OVRPlugin.FixedFoveatedRenderingLevel.Off
Low
= OVRPlugin.FixedFoveatedRenderingLevel.Low
Medium
= OVRPlugin.FixedFoveatedRenderingLevel.Medium
High
= OVRPlugin.FixedFoveatedRenderingLevel.High
HighTop
= OVRPlugin.FixedFoveatedRenderingLevel.HighTop

Enumeration TiledMultiResLevel

Off
= OVRPlugin.TiledMultiResLevel.Off
LMSLow
= OVRPlugin.TiledMultiResLevel.LMSLow
LMSMedium
= OVRPlugin.TiledMultiResLevel.LMSMedium
LMSHigh
= OVRPlugin.TiledMultiResLevel.LMSHigh
LMSHighTop
= OVRPlugin.TiledMultiResLevel.LMSHighTop

Enumeration SystemHeadsetType

None
= OVRPlugin.SystemHeadset.None
Oculus_Quest
= OVRPlugin.SystemHeadset.Oculus_Quest
Oculus_Quest_2
= OVRPlugin.SystemHeadset.Oculus_Quest_2
Meta_Quest_Pro
= OVRPlugin.SystemHeadset.Meta_Quest_Pro
Meta_Quest_3
= OVRPlugin.SystemHeadset.Meta_Quest_3
Placeholder_12
= OVRPlugin.SystemHeadset.Placeholder_12
Placeholder_13
= OVRPlugin.SystemHeadset.Placeholder_13
Placeholder_14
= OVRPlugin.SystemHeadset.Placeholder_14
Rift_DK1
= OVRPlugin.SystemHeadset.Rift_DK1
Rift_DK2
= OVRPlugin.SystemHeadset.Rift_DK2
Rift_CV1
= OVRPlugin.SystemHeadset.Rift_CV1
Rift_CB
= OVRPlugin.SystemHeadset.Rift_CB
Rift_S
= OVRPlugin.SystemHeadset.Rift_S
Oculus_Link_Quest
= OVRPlugin.SystemHeadset.Oculus_Link_Quest
Oculus_Link_Quest_2
= OVRPlugin.SystemHeadset.Oculus_Link_Quest_2
Meta_Link_Quest_Pro
= OVRPlugin.SystemHeadset.Meta_Link_Quest_Pro
Meta_Link_Quest_3
= OVRPlugin.SystemHeadset.Meta_Link_Quest_3
PC_Placeholder_4105
= OVRPlugin.SystemHeadset.PC_Placeholder_4105
PC_Placeholder_4106
= OVRPlugin.SystemHeadset.PC_Placeholder_4106
PC_Placeholder_4107
= OVRPlugin.SystemHeadset.PC_Placeholder_4107

Enumeration XRDevice

Unknown
= 0
Oculus
= 1
OpenVR
= 2

Enumeration ColorSpace

Unknown
= OVRPlugin.ColorSpace.Unknown
Unmanaged
= OVRPlugin.ColorSpace.Unmanaged
Rec_2020
= OVRPlugin.ColorSpace.Rec_2020
Rec_709
= OVRPlugin.ColorSpace.Rec_709
Rift_CV1
= OVRPlugin.ColorSpace.Rift_CV1
Rift_S
= OVRPlugin.ColorSpace.Rift_S
Quest
= OVRPlugin.ColorSpace.Quest
P3
= OVRPlugin.ColorSpace.P3
Adobe_RGB
= OVRPlugin.ColorSpace.Adobe_RGB

Enumeration ProcessorPerformanceLevel

PowerSavings
= OVRPlugin.ProcessorPerformanceLevel.PowerSavings
SustainedLow
= OVRPlugin.ProcessorPerformanceLevel.SustainedLow
SustainedHigh
= OVRPlugin.ProcessorPerformanceLevel.SustainedHigh
Boost
= OVRPlugin.ProcessorPerformanceLevel.Boost

Enumeration ControllerDrivenHandPosesType

None
No description available
ConformingToController
No description available
Natural
No description available

Properties

static OVRManager instance[Get]
Gets the singleton instance.
static OVRDisplay display[Get]
Gets a reference to the active display.
static OVRTracker tracker[Get]
Gets a reference to the active sensor.
static OVRBoundary boundary[Get]
Gets a reference to the active boundary system.
static OVRRuntimeSettings runtimeSettings[Get]
Gets a reference to the runtime settings.
static OVRProfile profile[Get]
Gets the current profile, which contains information about the user's settings and body dimensions.
static bool isHmdPresent[Get]
If true, a head-mounted display is connected and present.
static string audioOutId[Get]
Gets the audio output device identifier.
On Windows, this is a string containing the GUID of the IMMDevice for the Windows audio endpoint to use.
static string audioInId[Get]
Gets the audio input device identifier.
On Windows, this is a string containing the GUID of the IMMDevice for the Windows audio endpoint to use.
static bool hasVrFocus[Get]
If true, the app has VR Focus.
static bool hasInputFocus[Get]
If true, the app has Input Focus.
bool chromatic[Get]
If true, chromatic de-aberration will be applied, improving the image at the cost of texture bandwidth.
bool monoscopic[Get]
OVRPlugin.LayerSharpenType sharpenType[Get]
The sharpen type for the eye buffer.
OVRManager.ColorSpace colorGamut[Get]
The target color gamut the HMD will perform a color space transformation to.
OVRManager.ColorSpace nativeColorGamut[Get]
The native color gamut of the target HMD.
Vector3 headPoseRelativeOffsetRotation[Get]
Vector3 headPoseRelativeOffsetTranslation[Get]
XrApi xrApi[Get]
The native XR API being used.
UInt64 xrInstance[Get]
The value of current XrInstance when using OpenXR.
UInt64 xrSession[Get]
The value of current XrSession when using OpenXR.
int vsyncCount[Get]
The number of expected display frames per rendered frame.
static float batteryLevel[Get]
Gets the current battery level (Deprecated).
Returns
battery level in the range [0.0,1.0]
Parameters
batteryLevel
Battery level.
static float batteryTemperature[Get]
Gets the current battery temperature (Deprecated).
Returns
battery temperature in Celsius
Parameters
batteryTemperature
Battery temperature.
static int batteryStatus[Get]
Gets the current battery status (Deprecated).
Returns
battery status
Parameters
batteryStatus
Battery status.
static float volumeLevel[Get]
Gets the current volume level (Deprecated).
Returns
volume level in the range [0,1].
static ProcessorPerformanceLevel suggestedCpuPerfLevel[Get]
Gets or sets the current suggested CPU performance level, which can be overriden by the Power Management system.
static ProcessorPerformanceLevel suggestedGpuPerfLevel[Get]
Gets or sets the current suggested GPU performance level, which can be overriden by the Power Management system.
static int cpuLevel[Get]
Gets or sets the current CPU performance level (0-2).
Lower performance levels save more power. (Deprecated)
static int gpuLevel[Get]
Gets or sets the current GPU performance level (0-2).
Lower performance levels save more power. (Deprecated)
static bool isPowerSavingActive[Get]
If true, the CPU and GPU are currently throttled to save power and/or reduce the temperature.
static EyeTextureFormat eyeTextureFormat[Get]
Gets or sets the eye texture format.
static bool eyeTrackedFoveatedRenderingSupported[Get]
Gets if eye tracked foveated rendering feature is supported on this device.
static bool eyeTrackedFoveatedRenderingEnabled[Get]
Gets or sets if eye tracked foveated rendering is enabled or not.
static FoveatedRenderingLevel foveatedRenderingLevel[Get]
Gets or sets the tiled-based multi-resolution level This feature is only supported on QCOMM-based Android devices.
static bool fixedFoveatedRenderingSupported[Get]
static FixedFoveatedRenderingLevel fixedFoveatedRenderingLevel[Get]
static bool useDynamicFoveatedRendering[Get]
static bool useDynamicFixedFoveatedRendering[Get]
Let the system decide the best foveation level adaptively (Off .
. fixedFoveatedRenderingLevel) This feature is only supported on QCOMM-based Android devices
static bool tiledMultiResSupported[Get]
static TiledMultiResLevel tiledMultiResLevel[Get]
static bool gpuUtilSupported[Get]
Gets if the GPU Utility is supported This feature is only supported on QCOMM-based Android devices.
static float gpuUtilLevel[Get]
Gets the GPU Utilised Level (0.0 - 1.0) This feature is only supported on QCOMM-based Android devices.
static SystemHeadsetType systemHeadsetType[Get]
Get the system headset type.
OVRManager.TrackingOrigin trackingOriginType[Get]
Defines the current tracking origin type.
bool IsSimultaneousHandsAndControllersSupported[Get]
bool isSupportedPlatform[Get]
True if the current platform supports virtual reality.
bool isUserPresent[Get]
True if the user is currently wearing the display.
static System.Version utilitiesVersion[Get]
static System.Version pluginVersion[Get]
static System.Version sdkVersion[Get]

Object Data for protected-static-attrib

static OVRProfile _profile[Get]
static Vector3 OpenVRTouchRotationOffsetEulerLeft[Get]
static Vector3 OpenVRTouchRotationOffsetEulerRight[Get]
static Vector3 OpenVRTouchPositionOffsetLeft[Get]
static Vector3 OpenVRTouchPositionOffsetRight[Get]
static bool m_SpaceWarpEnabled[Get]
static Transform m_AppSpaceTransform[Get]
static DepthTextureMode m_CachedDepthTextureMode[Get]

Protected Fields

IEnumerable< Camera > disabledCameras[Get]

Events

static Action HMDAcquired
Occurs when an HMD attached.
static Action HMDLost
Occurs when an HMD detached.
static Action HMDMounted
Occurs when an HMD is put on the user's head.
static Action HMDUnmounted
Occurs when an HMD is taken off the user's head.
static Action VrFocusAcquired
Occurs when VR Focus is acquired.
static Action VrFocusLost
Occurs when VR Focus is lost.
static Action InputFocusAcquired
Occurs when Input Focus is acquired.
static Action InputFocusLost
Occurs when Input Focus is lost.
static Action AudioOutChanged
Occurs when the active Audio Out device has changed and a restart is needed.
static Action AudioInChanged
Occurs when the active Audio In device has changed and a restart is needed.
static Action TrackingAcquired
Occurs when the sensor gained tracking.
static Action TrackingLost
Occurs when the sensor lost tracking.
static Action< float, float > DisplayRefreshRateChanged
Occurs when the display refresh rate changes @params (float fromRefreshRate, float toRefreshRate)
static Action< UInt64, bool, OVRSpace, Guid > SpatialAnchorCreateComplete
Occurs when attempting to create a spatial anchor space @params (UInt64 requestId, bool result, OVRSpace space, Guid uuid)
static Action< UInt64, bool, OVRSpace, Guid, OVRPlugin.SpaceComponentType, bool > SpaceSetComponentStatusComplete
Occurs when attempting to enable a component on a space @params (UInt64 requestId, bool result, OVRSpace space, Guid uuid, OVRPlugin.SpaceComponentType componentType, bool enabled)
static Action< UInt64 > SpaceQueryResults
Occurs when one or more spaces are found during query @params (UInt64 requestId)
static Action< UInt64, bool > SpaceQueryComplete
Occurs when querying for a space completes @params (UInt64 requestId, bool result)
static Action< UInt64, OVRSpace, bool, Guid > SpaceSaveComplete
Occurs when saving a space @params (UInt64 requestId, OVRSpace space, bool result, Guid uuid)
static Action< UInt64, bool, Guid, OVRPlugin.SpaceStorageLocation > SpaceEraseComplete
Occurs when erasing a space @params (UInt64 requestId, bool result, Guid uuid, SpaceStorageLocation location)
static Action< UInt64, OVRSpatialAnchor.OperationResult > ShareSpacesComplete
Occurs when sharing spatial entities @params (UInt64 requestId, OVRSpatialAnchor.OperationResult result)
static Action< UInt64, OVRSpatialAnchor.OperationResult > SpaceListSaveComplete
Occurs when saving space list @params (UInt64 requestId, OVRSpatialAnchor.OperationResult result)
static Action< UInt64, bool > SceneCaptureComplete
Occurs when a scene capture request completes @params (UInt64 requestId, bool result)
static Action< int > PassthroughLayerResumed
Occurs when a passthrough layer has been rendered and presented on the HMD screen for the first time after being restarted.
@params (int layerId)
static Action HSWDismissed
Occurs when Health & Safety Warning is dismissed.

Fields

bool useRecommendedMSAALevel[Get]
If true, Unity will use the optimal antialiasing level for quality/performance on the current hardware.
bool enableDynamicResolution[Get]
float minDynamicResolutionScale[Get]
float maxDynamicResolutionScale[Get]
float minRenderScale[Get]
Min RenderScale the app can reach under adaptive resolution mode ( enableAdaptiveResolution = true );.
float maxRenderScale[Get]
Max RenderScale the app can reach under adaptive resolution mode ( enableAdaptiveResolution = true );.
int profilerTcpPort[Get]
The TCP listening port of Oculus Profiler Service, which will be activated in Debug/Developerment builds When the app is running on editor or device, open "Tools/Oculus/Oculus Profiler Panel" to view the realtime system metrics.
bool launchSimultaneousHandsControllersOnStartup[Get]
Specify if simultaneous hands and controllers should be enabled.
bool isInsightPassthroughEnabled[Get]
Specify if Insight Passthrough should be enabled.
Passthrough layers can only be used if passthrough is enabled.
bool usePositionTracking[Get]
If true, head tracking will affect the position of each OVRCameraRig's cameras.
bool useRotationTracking[Get]
If true, head tracking will affect the rotation of each OVRCameraRig's cameras.
bool useIPDInPositionTracking[Get]
If true, the distance between the user's eyes will affect the position of each OVRCameraRig's cameras.
bool resetTrackerOnLoad[Get]
If true, each scene load will cause the head pose to reset.
This function only works on Rift.
bool AllowRecenter[Get]
If true, the Reset View in the universal menu will cause the pose to be reset in PC VR.
This should generally be enabled for applications with a stationary position in the virtual world and will allow the View Reset command to place the person back to a predefined location (such as a cockpit seat). Set this to false if you have a locomotion system because resetting the view would effectively teleport the player to potentially invalid locations.
bool LateControllerUpdate[Get]
If true, a lower-latency update will occur right before rendering.
If false, the only controller pose update will occur at the start of simulation for a given frame. Selecting this option lowers rendered latency for controllers and is often a net positive; however, it also creates a slight disconnect between rendered and simulated controller poses. Visit online Oculus documentation to learn more.
OVRManager.ControllerDrivenHandPosesType controllerDrivenHandPosesType[Get]
bool SimultaneousHandsAndControllersEnabled[Get]
bool wideMotionModeHandPosesEnabled[Get]

Public Statics

static string OCULUS_UNITY_NAME_STR[Get]
static string OPENVR_UNITY_NAME_STR[Get]
static XRDevice loadedXRDevice[Get]
static string UnityAlphaOrBetaVersionWarningMessage[Get]
static bool OVRManagerinitialized[Get]
static Action< bool > OnPassthroughInitializedStateChange[Get]

Static Member Functions

static bool IsAdaptiveResSupportedByEngine ( )
Adaptive Resolution is based on Unity engine's renderViewportScale/eyeTextureResolutionScale feature But renderViewportScale was broken in an array of Unity engines, this function help to filter out those broken engines.
static void SetColorScaleAndOffset
( Vector4 colorScale,
Vector4 colorOffset,
bool applyToAllLayers )
Sets the Color Scale and Offset which is commonly used for effects like fade-to-black.
In our compositor, once a given frame is rendered, warped, and ready to be displayed, we then multiply each pixel by colorScale and add it to colorOffset, whereby newPixel = oldPixel * colorScale + colorOffset. Note that for mobile devices (Quest, etc.), colorOffset is only supported with OpenXR, so colorScale is all that can be used. A colorScale of (1, 1, 1, 1) and colorOffset of (0, 0, 0, 0) will lead to an identity multiplication and have no effect.
static void SetOpenVRLocalPose
( Vector3 leftPos,
Vector3 rightPos,
Quaternion leftRot,
Quaternion rightRot )
Specifies OpenVR pose local to tracking space.
static OVRPose GetOpenVRControllerOffset
( Node hand )
Specifies the pose offset required to make an OpenVR controller's reported pose match the virtual pose.
Currently we only specify this offset for Oculus Touch on OpenVR.
static void SetSpaceWarp
( bool enabled )
Enables or disables space warp.
static bool GetSpaceWarp ( )
static bool IsUnityAlphaOrBetaVersion ( )
static Camera FindMainCamera ( )
static void PlatformUIConfirmQuit ( )
static bool IsMultimodalHandsControllersSupported ( )
Checks whether simultaneous hands and controllers is currently supported by the system.
This method should only be called when the XR Plug-in is initialized.
static bool IsInsightPassthroughSupported ( )
Checks whether Passthrough is supported by the system.
This method should only be called when the XR Plug-in is initialized.
static PassthroughCapabilities GetPassthroughCapabilities ( )
Returns information about Passthrough capabilities provided by the system.
This method should only be called when the XR Plug-in is initialized.
static bool IsInsightPassthroughInitialized ( )
Checks whether Passthrough is initialized.
Returns
Boolean value to indicate the current state of passthrough. If the value returned is true, Passthrough is initialized.
static bool HasInsightPassthroughInitFailed ( )
Checks whether Passthrough has failed initialization.
Returns
Boolean value to indicate the passthrough initialization failed status. If the value returned is true, Passthrough has failed the initialization.
static bool IsInsightPassthroughInitPending ( )
Checks whether Passthrough is in the process of initialization.
Returns
Boolean value to indicate the current state of passthrough. If the value returned is true, Passthrough is initializing.
static bool IsPassthroughRecommended ( )
Get a system recommendation on whether Passthrough should be active.
When set, it is recommended for apps which optionally support an MR experience with Passthrough to default to that mode. Currently, this is determined based on whether the user has Passthrough active in the home environment.
Returns
Flag indicating whether Passthrough is recommended.
static bool GetFixedFoveatedRenderingSupported ( )
static FoveatedRenderingLevel GetFoveatedRenderingLevel ( )
static void SetFoveatedRenderingLevel
( FoveatedRenderingLevel level )
static bool GetDynamicFoveatedRenderingEnabled ( )
static void SetDynamicFoveatedRenderingEnabled
( bool enabled )
static bool GetEyeTrackedFoveatedRenderingSupported ( )
static bool GetEyeTrackedFoveatedRenderingEnabled ( )
static void SetEyeTrackedFoveatedRenderingEnabled
( bool enabled )
static void SetSpaceWarp_Internal
( bool enabled )
static void SetAppSpacePosition
( float x,
float y,
float z )
static void SetAppSpaceRotation
( float x,
float y,
float z,
float w )
static bool SetColorScaleAndOffset_Internal
( Vector4 colorScale,
Vector4 colorOffset,
bool applyToAllLayers )

Object Data for protected-static-func

static void OnPermissionGranted
( string permissionId )

Member Functions

void RegisterEventListener
( EventListener listener )
void DeregisterEventListener
( EventListener listener )
void ReturnToLauncher ( )
Leaves the application/game and returns to the launcher/dashboard.