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. For developers, faster iteration time is pivotal when it comes to making changes in the app. Before you can test the smallest change on an Oculus device, the system needs to package and deploy that change on the device. This can be time consuming considering the number of iterations an app can undergo before the final build.
Note: These tools promote faster iteration cycles and generate build in development mode. Therefore, you should not use the .apk file that these tools generate as the final .apk file. To generate the final shippable .apk file, you must use Unity’s Build or Build and Run feature.
Prior to using these tools, check the following prerequisites.
The OVR Build APK and Run 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. However, to publish the final .apk, you must use Unity’s build features.
To use OVR Build APK and Run:
On the menu, go to Oculus > OVR Build > OVR Build APK and Run.
OVR Scene Quick Preview uses Unity’s Asset Bundle system to reduce the deployment time by hot reloading changes. The first time it builds the .apk file, the file contains project’s code along with the asset bundle loader script. Based on the asset type, it breaks assets into individual asset bundles and deploys them to an external folder on the device. For example, asset bundles can be models, textures, audio, or entire scene. Next time, when you make a change to an asset, it builds and deploys only the bundles that contain changes, and therefore reduces the overall iteration time.
To use OVR Quick Scene Preview:
Next time, when you make changes to a scene, save everything and click Build and Deploy Scene(s).
The tool also contains several helpful options in the Utilities section: