Develop
Develop
Select your platform

Unreal Iteration Speed Best Practices

Updated: Sep 4, 2024
One of the core time sinks of iteration speed is the time it takes to build and deploy changes to the Meta Quest headset for testing. To reduce the time spent doing this, we have highlighted some best practices. Some of these practices might require some modifications to your project.
Link is a useful and fast way to iterate on a project. With a headset connected to your computer, you can play in Unreal Editor and get the results directly in the headset as well as take in the inputs from the device. This is useful in cases where the changes are device-independent, such as logical code changes, asset positioning, and asset updates. The situations where it might not be beneficial are when iterating on elements that are device dependent, like shaders and rendering, or logic that is specific to the device.
For more information, see Set up Link.

Meta XR Simulator

The Meta XR Simulator simulates the Meta Quest headset and features directly on your development computer. It lets you iterate quickly on your project without the need to put on a headset. For mixed reality, it provides synthetic environments that make it very easy to test different sizes and layouts of rooms. This enables you to test changes that are device agnostic, as well as verify app logic, repetitive movement/functionality, and mixed reality rooms.
For more information, see Meta XR Simulator.

Deploy to device

Sometimes, it is necessary to deploy and test the project on the device. For example, platform-specific features, game performance, and graphics all benefit from on-device testing.
Unreal Engine provides multiple entry points to launch the project on device, such as Package APK, Quick Launch, Project Launcher, and Unreal Automation Tool. For more information, see “Build Operations” in the Unreal Engine documentation.
There are several options that can improve the iteration speed for deploying to the device.

Skip APK packaging

When iterating on code, we can speed up the deploy time by skipping the Gradle packaging step, reuse the previously made APK, and push the compiled libUnreal.so directly to the device (Read more here).
This option can drastically reduce the deploy time to seconds.
To enable it, do any of the below:
  • DefaultEngine.ini
      [/Script/OculusXRHMD.OculusXRHMDRuntimeSettings]
      bDeploySoToDevice=True
    
  • Editor UI: “Meta XR Tools”, “Deploy compiled .so directly to device”
    Unreal Iteration Deploy SO
  • [Experimental] In UE 5.4, a new option bDontBundleLibrariesInAPK was introduced that achieves similar results. This will be available in a future Meta fork release.
    Unreal Iteration Dont Bundle Library

Iterative deploy

When iterating on assets, choose only to deploy the files/packages that have been modified.
This option can drastically reduce the deploy time to seconds.
To enable, do any of the following:
  • UnrealAutomationTool argument: -IterativeDeploy
  • Project Launcher: “Custom Launcher Profile” → “Deploy” → “Advanced Settings” → “Only deploy modified content”
    Unreal Project Launcher Iterative Deploy
Note: In the UE 5.3.2 Oculus-VR fork release, the ability to incorporate iterative deploy with Cook-on-the-Fly (CotF) was enabled. This reduces iterative cook time with CotF by up to ~70% in our tests (See the “Benchmarking” section below).
  • Iterative Cook-on-the-Fly (Meta fork only):
    • Engine config:
        [/Script/OculusXRHMD.OculusXRHMDRuntimeSettings]
        bIterativeCookOnTheFly=True
      
    • Editor UI: “Meta XR Tools” → “Enable Iterative Cook on the Fly” Unreal Iterative COTF Checkbox

Iterative cooking

When cooking the assets, only cook the modified ones. This means that the on-device cooked assets are reused, removing unnecessary work from the cooker and device deploy.
To enable, do any of the following:
  • UnrealAutomationTool argument: -IterativeCook
  • Project Launcher: “Custom launcher” → “Cook” → “Advanced Settings” → “Iterative cooking”
    Unreal Iterative Cook Checkbox
  • Project Settings: Enable iterative cooking for Quick Launch (or “Launch on”)
    Unreal Iterative Cook Configs

Cooking by the book vs. on the fly

Unreal Engine provides two cooking methods:
  • Cook by the book: Cook contents ahead of time before deploying.
  • Cook on the fly: Cook contents just in time after deployment during run time.
There are pros and cons, as well as different situations for both methods. In general:
  • Cook by the book: Deterministic, no runtime performance impact. Good for profiling or testing builds.
  • Cook on the fly: Fast deploy and iteration. Good for local development builds on subsets of assets.

Benchmarking

We tested the above options on:
  • A medium-sized project (~20GB disk size & ~5k asset packages)
  • Two sets of PC specifications
  • Clean builds and iterative builds
Observations:
  • Iterative methods are notably faster than the baseline configuration in iterative builds
  • Our patch with iterative deploy significantly accelerates Cook-on-the-Fly
Unreal Iteration Benchmark Iterative Builds
Additionally, when performing clean builds, Cook-on-the-Fly shortens the project launch time significantly, as it defers cooking to run time.
Unreal Iteration Benchmark Clean Builds

Experimental features

Here are some other promising features potentially worth trying:
  • Zen Store: Optimizes content deployment with HTTP chunks and reduces deploy time.
  • Multiprocess Cooking: Trades memory for parallelism. Can potentially accelerate cooking significantly in large projects.
Did you find this page helpful?