text
stringlengths 0
1.11k
|
|---|
Click the See other versions link to see the list of all available versions, and then select the version you want to upgrade.
|
In the detailed view, click Upgrade.
|
Uninstall Oculus XR Plugin
|
Disabling the Oculus XR Plugin package from the XR Plugin Management interface doesn’t automatically uninstall the plugin. You need to remove the plugin from the Package Manager window.
|
On the menu, go to Window > Package Manager.
|
From the Packages list, select In Project, and then select the Oculus XR Plugin package.
|
In the detailed view, click Remove.Add Camera Rig Using OVRCameraRig
|
Unity
|
All-In-One VR
|
PC VR
|
Quest
|
Rift
|
The platform for which this article is written (Unity) does not match your preferred platform (Nativa).
|
Haz clic aquí para ver la página del índice de la documentación para tu plataforma de preferencia.
|
The Meta XR Core SDK contains the OVRCameraRig prefab that provides the transform object to represent the Oculus tracking space. It contains a tracking space game object to fine-tune the relationship between the head tracking reference frame and your world. Under the tracking space object, you will find a center eye anchor, which is the main Unity camera, two anchor game objects for each eye, and left and right hand anchors for controllers. It also contains a custom VR camera, which replaces Unity’s conventional camera.
|
How Does This Work?
|
When you enable VR support in Unity, your headset automatically passes the head and positional tracking reference to Unity. This lets the camera position and orientation finely match with the user position and orientation in the real world. The head-tracked pose values overrides the camera’s transform values, which means the camera is always in a position relative to the player object.
|
In a typical first- or third-person setup, instead of having a stationary camera, you may want the camera to follow or track the player object. The player object can be a character in motion, such as an avatar, a car, or a gun turret. To move the camera to follow the player object, you can either make the camera a child of the player object or have an object track the player, and the camera, in turn, follows that object. Based on your app design, you may want to create a script that references the player object and attach the script to OVRCameraRig.
|
Add OVRCameraRig in the Scene
|
OVRCameraRig is a replacement to Unity’s main camera, which means you can safely delete Unity’s main camera from the Hierarchy tab. The primary benefit of using OVRCameraRig is that it provides access to OVRManager, which provides the main interface to the VR hardware. Before you add OVRCameraRig, make sure you have downloaded the Meta XR Core SDK as an individual package or as part of the Meta XR All-in-One SDK and enabled the VR support.
|
From the Hierarchy tab, right-click Main Camera, and click Delete.
|
In the Project tab, expand the Assets > Oculus > VR > Prefab folder, and drag and drop the OVRCameraRig prefab into the scene. You can also drag and drop it in the Hierarchy tab.
|
Configure Settings
|
There are two main scripts attached to the OVRCameraRig prefab: OVRCameraRig.cs and OVRManager.cs. Each script provides settings for camera, display, tracking, quality, and performance of your app.
|
To begin with settings, in the Hierarchy tab, select OVRCameraRig, and in the Inspector tab, review the following settings:.
|
OVRCameraRig Settings
|
OVRCameraRig.cs is a component that controls stereo rendering and head tracking. It maintains three child anchor transforms at the poses of the left and right eyes, as well as a virtual center eye that is halfway between them. It is the main interface between Unity and the cameras. and attached to a prefab that makes it easy to add comfortable VR support to a scene.
|
Note: All camera control should be done through this component.
|
Use Per Eye Camera: Select this option to use separate cameras for left and right eyes.
|
Use Fixed Update For Tracking: Select this option to update all the tracked anchors in the FixedUpdate() method instead of Update() method to favor physics fidelity. However, if the fixed update rate doesn’t match the rendering frame rate, which is derived by using OVRManager.display.appFramerate, the anchors visibly judder.
|
Disable Eye Anchor Cameras: Select this option to disable the cameras on the eye anchors. In this case, the main camera of the game is used to provide the VR rendering and the tracking space anchors are updated to provide reference poses.
|
OVRManager Settings
|
OVRManager.cs is the main interface to the VR hardware and is added to the OVRCameraRig prefab. It is a singleton that exposes the Oculus SDK to Unity, and includes helper functions that use the stored Meta variables to help configure the camera behavior. It can be a part of any app object and should only be declared once.
|
Target Devices
|
All apps that target Meta Quest are automatically compatible to run on Meta Quest 2. However, when you query the headset type that the app is running on, Meta returns Meta Quest even if the headset is Meta Quest 2 for the best compatibility. If you precisely want to identify the headset type, select Meta Quest and Meta Quest 2 as target devices. In this case, when you query the headset type, Meta returns the exact headset that the app is running on. Based on the target headset, Meta automatically adds the <meta-data android:name="com.oculus.supportedDevices" android:value="quest" /> element for Meta Quest, and the <meta-data android:name="com.oculus.supportedDevices" android:value="quest|quest2" /> element for both Meta Quest and Meta Quest 2 in the Android Manifest file. There is no need to update the Android Manifest file manually.
|
When apps target both the headsets, check the headset type to optimize the app. Call OVRManager.systemHeadsetType() to return the headset type that the app is running on. For example, the method returns Oculus_Quest or Oculus_Quest_2 depending on the headset type.
|
Performance and Quality
|
Use Recommended MSAA Level: True, by default. Select this option to let OVRManager automatically choose the appropriate MSAA level based on the Meta device. For example, the MSAA level is set to 4x for Meta Quest. Currently supported only for Unity’s built-in render pipeline.
|
Note: For Universal Render Pipeline (URP), manually set the MSAA level to 4x. We are aware of this issue that URP does not set the MSAA level automatically. We will announce the fix in the Release Notes page, when available.
|
Monoscopic: If true, both eyes see the same image rendered from the center eye pose, saving performance on low-end devices. We do not recommend using this setting as it doesn’t provide the correct experience in VR.
|
Min Render Scale: Sets minimum bound for Adaptive Resolution (default value is 0.7).
|
Max Render Scale (Rift only): Sets maximum bound for Adaptive Resolution (default value is 1.0).
|
Head Pose Relative Offset Rotation: Sets the relative offset rotation of head poses.
|
Head Pose Relative Offset Translation: Sets the relative offset translation of head poses.
|
Profiler TCP Port: The TCP listening port of Oculus Profiler Service, which is activated in debug or development builds. When the app is running on editor or device, go to Oculus > Tools > Oculus Profiler Panel to view the real-time system metrics.
|
Tracking
|
Tracking Origin Type: Sets the tracking origin type.
|
Eye Level tracks the position and orientation relative to the device’s position.
|
Floor Level tracks the position and orientation relative to the floor, whose height is decided through boundary setup.
|
Stage also tracks the position and orientation relative to the floor. On Quest, the Stage tracking origin will not directly respond to user recentering.
|
Use Positional Tracking: When enabled, head tracking affects the position of the virtual cameras.
|
Use IPD in Positional Tracking: When enabled, the distance between the user’s eyes affects the position of each OVRCameraRig’s cameras.
|
Allow Recenter: Select this option to reset the pose when the user clicks the Reset View option from the universal menu. You should select this option for apps with a stationary position in the virtual world and allow the Reset View option to place the user back to a predefined location (such as a cockpit seat). Do not select this option if you have a locomotion system because resetting the view effectively teleports the user to potentially invalid locations.
|
Late Controller Update: Select this option to update the pose of the controllers immediately before rendering for lower latency between real-world and virtual controller movement. If controller poses are used for simulation/physics, the position may be slightly behind the position used for rendering (~10ms). Any calculations done at simulation time may not exactly match the controller’s rendered position.
|
Display
|
Remaster your app by setting the specific color space at runtime to overcome the color variation that may occur due to different color spaces in use.
|
From the Color Gamut list, select the specific color space. For more information about the available color gamut primaries, go to the Set Specific Color Space topic.
|
Quest Features
|
There are certain settings that are applicable to Meta Quest only.
|
Focus Aware: Select this option to allow users to access system UI without context switching away from the app. For more information about enabling focus awareness, go to the Enable Focus Awareness for System Overlays topic.
|
Hand Tracking Support: From the list, select the type of input affordance for your app. For more information about setting up hand tracking, go to the Set Up Hand Tracking topic.
|
Hand Tracking Frequency: From the list, select the hand tracking frequency. A higher frequency allows for better gesture detection and lower latencies but reserves some performance headroom from the application’s budget. For more information, go to the Set High Frequency Hand Tracking section.
|
Requires System Keyboard: Select this option to allow users to interact with a system keyboard. For more information, go to the Enable Keyboard Overlay in Unity topic.
|
System Splash Screen: Click Select to open a list of 2D textures and select the image you want to set as the splash screen.
|
Allow Optional 3DoF Head Tracking: Select this option to support 3DoF along with 6DoF and let the app run without head tracking, for example, under low-lighting mode. When your app supports 3DoF, Meta automatically sets the headtracking value to false in the Android Manifest by changing <uses-feature android:name="android.hardware.vr.headtracking" android:version="1" android:required="false" />. When the checkbox is not selected, in other words the app supports only 6DoF, the headtracking value is set to true.
|
Android Build Settings
|
The shader stripping feature lets you skip unused shaders from compilation to significantly reduce the player build time. Select Skip Unneeded Shaders to enable shader stripping. For more information about understanding different tiers and stripping shaders, go to the Strip Unused Shaders topic.
|
Security
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.