text
stringlengths
0
1.11k
Custom Security XML Path: If you don’t want Meta to generate a security XML and instead use your own XMl, specify the XML file path.
Disable Backups: Select this option to ensure private user information is not inadvertently exposed to unauthorized parties or insecure locations. It adds the allowBackup="false" flag in the AndroidManifest.xml file.
Enable NSC Configuration: Select this option to prevent the app or any embedded SDK from initiating cleartext HTTP connections and force the app to use HTTPS encyrption.
Mixed Reality Capture
Mixed Reality Capture (MRC) places real-world objects in VR. In other words, it combines images from the real world with the virtual one. To enable the mixed reality support, select Show Properties, and then select enableMixedReality. For more information about setting up mixed reality capture, go to the Unity Mixed Reality Capture guide.
Build and Configuration Overview
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.
This topic outlines instructions and describes important considerations about the following:
Build settings for a Unity project
Quality and rendering settings to optimize the build time and app performance in Unity
For quick hands-on instructions on creating a very simple project that builds and runs on a Meta Quest headset, see Hello VR on Meta Quest Headset tutorial.
Select Build Platform
This section describes how to set target platform and customize settings for your build. Before you proceed with any other project settings, set the target platform for the app as each platform has unique settings.
The target platform for Oculus Quest and Quest 2 is Android and the final output is a .apk file.
On the menu, go to File > Build Settings.
Under Platform, select Android.
Set Texture Compression to ASTC.
From Run Device, select the Oculus headset to load the app on the headset. The device is listed only if it is connected to your computer over USB. This is an optional step and is usually helpful to test the app on a real headset.
Clear the Development Build selection for the final build as it may impact performance.
Click Switch Platform.
Add Scenes
The Scenes In Build pane displays a list of scenes from the project that Unity includes in the build.
In Scenes In Build pane, click Add Open Scenes. Alternatively, you can drag scenes from the Assets folder into this window.
Clear the scene selection for the ones you want to exclude from the build. This excludes the scene from the build and not from the list.
To adjust the order of the scenes, drag them up or down the list. Numbers on the right indicates the scene index, which is mostly used in scripting APIs.
Configure Settings
Before you generate the build, there are a variety of additional settings you can also consider. These settings define VR support, package details to uniquely identify your app in the Meta Quest store, and optimize app performance.
Note: If you have followed instructions in Configure Settings, you can skip this step.
Enable VR support.
Add package details to provide package name and the Android version your app supports.
Perform quality settings to define graphical quality such as texture quality, pixel light count, or anti-aliasing level.
Perform rendering settings to select a specfic set of Graphics APIs, choose color space property, or enable multithreaded rendering.
Strip Unused Shaders
Before you generate the final build, we highly recommend that you strip unused shaders, which significantly reduces the build time.
Generate Build
To generate the final build, you have two options:
To build your app into Player, click Build and provide location to save your build. This option builds the ready-to-upload executable. It does not automatically deploy or run your app on the headset.
To build your app into Player and run it on the headset, click Build and Run and provide location to save your build.
The Build and Run option requires you to connect the headset to your computer over a USB-C cable. As mentioned in step 4 of Select Build Platform, select the device from the Run Device list. If your device is not connected or has connection or detection issues, the Build and Run option fails in generating build.
Improve Build Times
Before you are ready for the final build, your app undergoes many changes, which often require you to rebuild the app. In general, Unity’s build options are time consuming as it compiles the entire project instead of generating deltas from your previous build.
To reduce build times, we highly recommend that you use OVR Build APK. If you are building your app exclusively for debug purposes, you can also use OVR Quick Scene Preview. These tools are specifically designed for Android apps and significantly expedite build iterations.Optimize Build Iterations and Use Quick Scene Preview
Unity
All-In-One VR
Quest
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.
Build process is one of the significant processes of the app development lifecycle. The time the system takes to build...deploy...run...repeat is known as iteration time. Before you can test the smallest change on the Meta Quest headset, the system needs to package and deploy that change on the headset. Faster iteration time is pivotal when it comes to making changes in the app, considering the number of iterations an app can undergo before the final build.
To expedite the iteration process, use OVR Build APK and OVR Quick Scene Preview, which are both part of the Meta XR Core SDK. This can be downloaded individually as a standalone package or bundled as part of the Meta XR All-in-One SDK.
Prerequisites
Prior to using these tools, check the following prerequisites.
Use Unity version 2021 LTS or higher
Use the Windows operating system for development (macOS development platform does not support these features.)
OVR Build APK
The OVR Build APK tool runs a command that utilizes the gradle cache to speed up the build process. It starts by launching Unity’s build and export functionality, and when the initial build is compiled, it uses the gradle’s cache to only update the delta between builds. This way, it doesn’t rebuild files that are not a part of the change, and therefore, reduces the build and deploy time by 10 to 50% compared to Unity’s build time. There is no change in the final .APK file and it is identical to the one that Unity’s build produces.
To use OVR Build APK:
In the menu, go to File > Build Settings > select scenes that you want to build.