Better build system across device targets (Quest/Pico/Vive)

Hi,

A lot of development time is lost trying to get a build system working that can target multiple VR platforms.

The problem:

Each XR/VR platform has it’s own plugin needs. For example Pico needs Oculus Disabled, Oculus needs Steam disabled etc. This is the same for OpenXR due to plugins for each device type. In addition each platform has a different Online Subsystem. So different plugins need enabling for each build.

The only way I can do this without editing the build system itself is to have multiple .uproject files, one for each device target (Quest, Pico etc). And multiple configs/.inis copied using a script (AndroidEngineQuest.ini → AndroidEngine.ini).

The problem with this is that enabling and disabling plugins requires a rebuild of the Development Editor configuration first otherwise the cook fails. So you can’t run a script that builds for each target, one after the other.

The solution:

What’s really needed is that the platform list on each plugin (android, win64 etc.) should be able to include target device (Oculus Quest, Pico) so that at build time the right plugins are enabled/disabled (-TargetDevice=Quest sort of thing). And that platform specific .ini files are supported AndroidQuest.ini. AndroidPico.ini and so on. Then a CI can run the whole thing.

What makes this worse is that across platforms shader settings change such as stereo instancing which then triggers a rebuild of all shaders which takes forever.

Has anyone done this or is there any intention of improving the build system?

At the moment I’m now looking at cloning the project for each device to a new folder and maintaining independent per device builds per folder, which is really inefficient and hard to manage along with needing a huge amount of disk space as I’m using from Source UE builds (200Gb ish per project clone once built).

1 Like

Hey there,

Solution 1:
You can probably achieve this by adding custom Android Variants and using the -customconfig argurment to create target platforms that use different config.ini files. And by adding a bit of magic in your Target.cs you can also use this -customconfig argument to enable/disable specific plugins.

However:

  • This represents a lot of engine modifications and I beleive the ‘customconfig’ feature is UE5 only so you’ll need to bring those changes back if you’re on UE4.X.
  • This would not fix the rebuild of shaders caused by certain settings (ie: instanced stereo/multi-view) as the custom config files only get applied when the package starts (it is not used in editor).

I’m not too familiar with UE5 but I believe the platform system has been overhauled, it might be worth checking out to see if it is easier to customise.

Solution 2:
You might be able to use source control and branch out for each platform. Although it is annoying as you’ll need to sync each branch everytime you have an update, you’ll at least won’t have to manage multiple engine builds.

Cheers

Hi, thanks for the ideas, sounds like custom configs take me part there but not for disabling/enabling plugins at build time.