text
stringlengths
0
1.11k
There are a variety of options and settings that let you optimize rendering. You can define a specific set of Graphics APIs, choose color space property, or enable multithreaded rendering to optimize performance.
On the menu, go to Edit > Project Settings > Player, and then expand the Other Settings tab
On the Other Settings tab, under Rendering, do the following:
a. Set the Color Space property to Linear for realistic rendering. It lets colors supplied to shaders within your scene brighten linearly as light intensities increase. For more information about selecting the correct color space for your project, Unity has outlined the gamma and linear color space workflow to understand the differences.
b. Clear Auto Graphics API to manually pick and set the order in which the Graphics APIs are consumed. We now recommend developers to use the Vulkan API as some of the newer features for Meta Quest devices are only supported with that API.
c. Select Multithreaded Rendering to move graphics API calls from the main thread to a separate worker thread.
d. Select Low Overhead Mode to skip error checking in release versions of an app. This is applicable to apps that use OpenGL ES API.
Define Quality Settings
Several quality options let you define the graphical quality.
On the menu, go to Edit > Project Settings > Quality.
In Pixel Light Count, set the maximum number of pixel light count to one.
In the Texture Quality list, select Full Res to display textures at maximum resolution.
In the Anisotropic Textures list, select Per Texture.
In the Anti Aliasing list, select 4x. Unlike non-VR apps, VR apps must set the multisample anti-aliasing (MSAA) level appropriately high to compensate for stereo rendering, which reduces the effective horizontal resolution by 50%. You can also let OVRManager automatically select the appropriate multisample anti-aliasing (MSAA) level based on the headset.
Known Issue: If you are using Universal Render Pipeline (URP), you need to manually set the MSAA level to 4x. We are aware of the issue that URP does not set the MSAA level automatically. Once the fix is published, we will announce it on our Release Notes page.
Clear the Soft Particles check box.
Select the Realtime Reflections Probes checkbox to update reflection probes during gameplay.
Select the Billboards Face Camera checkbox to force billboards to face the camera while rendering instead the camera plane.
Generate Android Manifest File
Every Meta Quest app built for Meta Quest headsets must contain the AndroidManifest.xml file. It is a vital part of an Android app as it contains essential metadata such as permissions, package details, hardware and software support, supported Android version, and other important configurations.
Meta Quest has automated the process of adding the metadata in the manifest file and you need to generate the Android Manifest file from Unity. This means that you don’t need to manually update the manifest file to add app details or specific hardware and software support that request permission.
For example, there’s no need to manually add the package name or the minimum supported Android version in the manifest file. When you set the package name and select the minimum Android API level from Project Settings, say API level 19, Meta Quest automatically adds the <uses-sdk android:minSdkVersion="19" /> element and the package attribute and its value.
From the hardware standpoint, all apps that target the Meta Quest headset are automatically compatible to run on Meta Quest 2. To retrieve the correct headset that the app is running on, it’s ideal to set Meta Quest and Meta Quest 2 as target headsets for the app. Based on the device type, Meta Quest 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 manifest file. There is no need to update the Android Manifest file manually.
Similarly, when you enable hand tracking from Unity, Meta Quest automatically adds the feature and sets the permission value based on the setting you’ve opted in Unity.
To generate the Meta Quest store-compatible Android manifest file, in the menu, go to Oculus > Tools > Create store-compatible AndroidManifest.xml.
Install, Uninstall, and Upgrade XR Plugin
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.
XR is an umbrella term that covers Virtual Reality (VR), Mixed Reality (MR), and Augmented Reality (AR). Meta streamlines XR support via Unity’s XR Plugin Management package. The package provides deep platform integration across XR platforms and streamlines the development process of XR applications.
How does this work?
Unity provides the Oculus XR Plugin to develop Unity applications for Meta Quest headsets. It exposes settings for common lifecycle management and runtime settings such as rendering modes, depth buffer sharing, and latency optimization. Essential utilities for VR development are available in the Meta XR Core SDK available on the Unity Asset Store and the NPM Registry. This SDK contains the OVRPlugin, which provides built-in editor support and several additional features. The OVRPlugin combined with Unity’s Oculus XR Plugin allows Unity to talk to the OpenXR, VRAPI, and CAPI backends on Meta Quest headsets. To accelerate OpenXR adoption and allow you to seamlessly target a wide range of AR/VR headsets, Meta has made OpenXR runtime the default backend. Starting with the Meta XR SDKs version 31, all new features are available on the OpenXR backend only.
Note: The OpenXR backend mentioned in this topic is different than Unity OpenXR plugin.
Meta XR Architecture Diagram
Why use the Meta XR Core SDK?
While Unity’s Oculus XR Plugin provides the base functionality for getting the XR application running on the Meta Quest headset, we recommend using the Meta XR Core SDK package if the project requires the latest up-to-date features. It contains the latest version of OVRPlugin as well as handy C# scripts that expose Meta Quest features that are not yet provided through Unity’s APIs. For example, advanced features such as presence platform, voice, hand tracking, interaction, and many more are surfaced through the Meta XR Core SDK and not through Unity API.
Install Oculus XR Plugin
Note: Installing Oculus XR Plugin does not download and import the Meta XR SDKs in to your project. Make sure you download the Meta XR SDKs you need from the Unity Asset Store.
There are two ways you can install the Oculus XR plugin from the Unity editor: from Unity Package Manager or via XR Plugin Management interface. This section describes both the methods in detail.
From Unity Package Manager
Unity Package Manager hosts a collection of several packages, from where you can easily install, uninstall, or update packages. The Oculus XR Plugin package ships with built-in XR Management support. To install Oculus XR Plugin from the package manager:
On the menu, go to Window > Package Manager.
From the Packages list, select Unity Registry to view all the packages available in the Unity package registry.
Select and expand the Oculus XR Plugin package from the list of packages.
Click the See other versions link to see the list of all available versions, and then select the latest version.
In the detailed view, click Install.
From XR Plugin Management Interface
On the menu, go to Edit > Project Settings, and then select XR Plug-in Management.
Click Install XR Plugin Management if the package is not installed already.
On the Android tab, select the Oculus checkbox to install the Oculus XR plugin.
On the menu, go to Windows > Package Manager, and then expand Oculus XR Plugin. If you can’t find Oculus XR Plugin in the list, from the Packages list, select Unity Registry to see all the available packages from the registry.
Click the See other versions link and select the latest version from the available list.
Note: There is a possibility that Unity may not install the latest Oculus XR Plugin version. Instead, it installs the Oculus XR plugin version that is verified to work with the Unity editor version that you are using. To highlight the verified version, Unity adds an indicator by adding Verified or R next to the version in the list. In such case, it is safe to update the plugin to use the latest version even if it is pending verification.
In the detailed view, click Update.
Upgrade or Switch to Another Oculus XR Plugin Version
You can upgrade to the latest available Oculus XR Plugin version or switch to any available version from the Package Manager window. A few runtime settings maybe available on the latest version only.
On the menu, go to Window > Package Manager.
From the Packages list, select Unity Registry, and then expand the Oculus XR Plugin package.