API reference
API reference
Select your platform
No SDKs available
No versions available

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

Gets the singleton instance.
Gets a reference to the active display.
Gets a reference to the active sensor.
Gets a reference to the active boundary system.
Gets a reference to the runtime settings.
Gets the current profile, which contains information about the user's settings and body dimensions.
If true, a head-mounted display is connected and present.
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.
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.
If true, the app has VR Focus.
If true, the app has Input Focus.
If true, chromatic de-aberration will be applied, improving the image at the cost of texture bandwidth.
bool monoscopic[Get]
The sharpen type for the eye buffer.
The target color gamut the HMD will perform a color space transformation to.
The native color gamut of the target HMD.
Vector3 headPoseRelativeOffsetRotation[Get]
Vector3 headPoseRelativeOffsetTranslation[Get]
If premultipled alpha blending is used for the eye fov layer.
Useful for changing how the eye fov layer blends with underlays.
The system state of the Guardian boundary visibility.
The native XR API being used.
The value of current XrInstance when using OpenXR.
The value of current XrSession when using OpenXR.
The number of expected display frames per rendered frame.
Gets the current battery level (Deprecated).
Returns
battery level in the range [0.0,1.0]
Parameters
batteryLevel
Battery level.
Gets the current battery temperature (Deprecated).
Returns
battery temperature in Celsius
Parameters
batteryTemperature
Battery temperature.
Gets the current battery status (Deprecated).
Returns
battery status
Parameters
batteryStatus
Battery status.
Gets the current volume level (Deprecated).
Returns
volume level in the range [0,1].
Gets or sets the current suggested CPU performance level, which can be overriden by the Power Management system.
Gets or sets the current suggested GPU performance level, which can be overriden by the Power Management system.
Gets or sets the current CPU performance level (0-2).
Lower performance levels save more power. (Deprecated)
Gets or sets the current GPU performance level (0-2).
Lower performance levels save more power. (Deprecated)
If true, the CPU and GPU are currently throttled to save power and/or reduce the temperature.
Gets or sets the eye texture format.
Gets if eye tracked foveated rendering feature is supported on this device.
Gets or sets if eye tracked foveated rendering is enabled or not.
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]
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]
Gets if the GPU Utility is supported This feature is only supported on QCOMM-based Android devices.
Gets the GPU Utilised Level (0.0 - 1.0) This feature is only supported on QCOMM-based Android devices.
Get the system headset type.
Defines the current tracking origin type.
bool IsSimultaneousHandsAndControllersSupported[Get]
True if the current platform supports virtual reality.
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

Occurs when an HMD attached.
Occurs when an HMD detached.
Occurs when an HMD is put on the user's head.
Occurs when an HMD is taken off the user's head.
Occurs when VR Focus is acquired.
Occurs when VR Focus is lost.
Occurs when Input Focus is acquired.
Occurs when Input Focus is lost.
Occurs when the active Audio Out device has changed and a restart is needed.
Occurs when the active Audio In device has changed and a restart is needed.
Occurs when the sensor gained tracking.
Occurs when the sensor lost tracking.
Occurs when the display refresh rate changes @params (float fromRefreshRate, float toRefreshRate)
Occurs when attempting to create a spatial anchor space @params (UInt64 requestId, bool result, OVRSpace space, Guid uuid)
Occurs when attempting to enable a component on a space @params (UInt64 requestId, bool result, OVRSpace space, Guid uuid, OVRPlugin.SpaceComponentType componentType, bool enabled)
Occurs when one or more spaces are found during query @params (UInt64 requestId)
Occurs when querying for a space completes @params (UInt64 requestId, bool result)
Occurs when saving a space @params (UInt64 requestId, OVRSpace space, bool result, Guid uuid)
Occurs when erasing a space @params (UInt64 requestId, bool result, Guid uuid, SpaceStorageLocation location)
Occurs when sharing spatial entities @params (UInt64 requestId, OVRSpatialAnchor.OperationResult result)
Occurs when saving space list @params (UInt64 requestId, OVRSpatialAnchor.OperationResult result)
Occurs when a scene capture request completes @params (UInt64 requestId, bool result)
Occurs when a passthrough layer has been rendered and presented on the HMD screen for the first time after being restarted.
@params (int layerId)
Occurs when the system's boundary visibility has been changed.
@params (OVRPlugin.BoundaryVisibility newBoundaryVisibility)
Occurs when Health & Safety Warning is dismissed.

Fields

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]
Min RenderScale the app can reach under adaptive resolution mode ( enableAdaptiveResolution = true );.
Max RenderScale the app can reach under adaptive resolution mode ( enableAdaptiveResolution = true );.
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.
Specify if simultaneous hands and controllers should be enabled.
Specify if Insight Passthrough should be enabled.
Passthrough layers can only be used if passthrough is enabled.
The desired state for the Guardian boundary visibility.
The system may ignore a request to suppress the boundary visibility if deemed necessary.If Passthrough has been initialized, then an attempt will be made every frame to update the boundary state if different from the system state. It is important to therefore keep this variable aligned with the state of your Passthrough layers (e.g. set boundary suppression to false when disabling the OVRPassthroughLayer, and set boundary suppression to true only when the layer is active).
If true, head tracking will affect the position of each OVRCameraRig's cameras.
If true, head tracking will affect the rotation of each OVRCameraRig's cameras.
If true, the distance between the user's eyes will affect the position of each OVRCameraRig's cameras.
If true, each scene load will cause the head pose to reset.
This function only works on Rift.
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.
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

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.
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.
Specifies OpenVR pose local to tracking space.
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.
Enables or disables space warp.
static bool GetSpaceWarp ( )
static bool IsUnityAlphaOrBetaVersion ( )
static Camera FindMainCamera ( )
static void PlatformUIConfirmQuit ( )
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.
Checks whether Passthrough is supported by the system.
This method should only be called when the XR Plug-in is initialized.
Returns information about Passthrough capabilities provided by the system.
This method should only be called when the XR Plug-in is initialized.
Checks whether Passthrough is initialized.
Returns
Boolean value to indicate the current state of passthrough. If the value returned is true, Passthrough is initialized.
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.
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.
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 )
Leaves the application/game and returns to the launcher/dashboard.
Did you find this page helpful?
Thumbs up icon
Thumbs down icon