
Unity | A Detailed Look at the Unity Integration | 13
OVRManager
OVRManager is the main interface to the VR hardware. It is a singleton that exposes the Oculus SDK to Unity,
and includes helper functions that use the stored Oculus variables to help configure camera behavior.
This component is added to the OVRCameraRig prefab. It can be part of any application object. However, it
should only be declared once, because there are public members that allow for changing certain values in the
Unity inspector.
OVRManager.cs contains the following public members:
Table 1: Mobile and PC Public Members
Monoscopic If true, rendering will try to optimize for a single viewpoint rather than rendering once for
each eye. Not supported on all platforms.
Eye Texture Format Sets the format of the eye RenderTextures. Normally you should use Default or
DefaultHDR for high-dynamic range rendering.
Eye Texture Depth Sets the depth precision of the eye RenderTextures. May fix z-fighting artifacts at the
expense of performance.
Eye Texture Antialiasing Sets the level of antialiasing for the eye RenderTextures.
Table 2: PC-Only Public Members
Native Texture Scale Each camera in the camera controller creates a RenderTexture that is the ideal size for
obtaining the sharpest pixel density (a 1-to-1 pixel size in the center of the screen post
lens distortion). This field can be used to permanently scale the cameras' render targets
to any multiple ideal pixel fidelity, which gives you control over the trade-off between
performance and quality.
Virtual Texture Scale This field can be used to dynamically scale the cameras render target to values lower
then the ideal pixel delity, which can help reduce GPU usage at run-time if necessary.
Use Position Tracking If disabled, the position detected by the tracker will stop updating the HMD position.
Use Rotation Tracking If disabled, the orientation detected by the tracker will stop updating the HMD orientation.
Mirror to Display If the Oculus direct-mode display driver is enabled and this option is set, the rendered
output will appear in a window on the desktop in addition to the Rift. Disabling this can
slightly improve performance.
Time Warp (desktop only) Time warp is a technique that adjusts the on-screen position of rendered images based
on the latest tracking pose at the time the user will see it. Enabling this will force vertical-
sync and make other timing adjustments to minimize latency.
Freeze Time Warp
(desktop only)
If enabled, this illustrates the effect of time warp by temporarily freezing the rendered
eye pose.
Reset Tracker On Load This value defaults to True. When turned off, subsequent scene loads will not reset the
tracker. This will keep the tracker orientation the same from scene to scene, as well as
keep magnetometer settings intact.
Commenti su questo manuale