We have been working with Unity to reduce build and iteration time for VR developers. We recently updated our Unity documentation with a new section entitled Unity Iteration Speed Best Practices that details the iteration wins from our collaboration. Some modifications to your project may be required to achieve the optimal iteration loop. This blog post highlights the best practices detailed in our updated documentation, with links to relevant sections for you to dive deeper.
Keeping Up to Date with Unity Versions
In our latest tests, we have found that Unity has been making a lot of progress to reduce build times between their versions year after year. We recommend getting the latest LTS in order to get the benefits of faster build times as well as the stability they provide. For a project in early development, you may get higher iteration improvements using the latest released version. However, this version could be less stable than the LTS, since it’s still in development. Upgrading from Unity 2019 -> 2020 showed a 33%-42% reduction in iteration time while upgrading from Unity 2020 -> 2021 showed a 8%-16% reduction in iteration time. (More details on Keeping Up to Date with Unity versions)
Script Only Patch
Unity introduced an option to patch the generated APK when developers make code only changes. This type of build considerably reduces the time it takes to build. You can find the details on how to build the patch in the Unity manual. We've found that a project that includes the assets in the APK can improve build times by 45% since it builds only code that has changed. (More details on Script Only Patch)
Addressables
The addressables system separates the assets building process from the code building process. This reduces building time by only building what was changed. This system makes it easy with an interface to group assets together and ensure that the dependencies will be included in the bundles.
Here is a comparison of Unity LTS 2021.1.15f1 Base project vs Addressables project
By dividing assets from code, the build of the APK is more than 50% faster. When modifying the assets only, without the need to rebuild the APK, it is about 75% faster. We also consider that assets-only changes are updating the addressable bundles that are loaded remotely using a local hosting solution. Therefore there is no time spent on pushing the bundles to the device. (More details on Addressables)
OVR Quick Scene Preview (QSP)
If converting your current project to use addressables is a lot of work and you want a quicker solution while converting your project, we’ve developed a tool that will divide the project into bundles that will be pushed to the device. This tool is OVR Quick Scene Preview, and you can get more details in our documentation. Here are some data points on how it can be beneficial using Unity LTS 2020.3.14f1. (More details on OVR Quick Scene Preview)
We observed an improvement of over 53% in all areas except for the clean build. There’s a higher time cost to make this initial build, but the subsequent builds are given a considerable time boost that is worth the tradeoff.
Oculus Link
Using Oculus Link is a useful and fast way to iterate on a project. With a headset connected to your computer, you can start the scene in Unity and get the results directly in the headset, as well as taking in the inputs from the device. This is useful in most cases where the changes are device-independent like logical code change, asset positioning, asset update. The situations where it might not be beneficial are when iterating on an element that is device-dependent—like shaders and rendering—or logic that is specific to the device. (How to set your Quest to use Oculus Link)
Be sure to check out the complete Unity Iteration Speed Best Practices guide in our documentation to see all the opportunities to improve your iteration time. The guide also includes detailed instructions for implementing these modifications, as well as additional data on the improvements we saw. We hope these best practices bring you significant reductions in your iteration time so you can have more time to develop bigger and better experiences for Quest.
Quest
Unity
Did you find this page helpful?
Explore more
What Makes a Meta VR Title Work Hands-Only
Learn when hand tracking fits your Meta VR title and how to adapt and test hands-first interactions before Meta VR Glasses ship.