cancel
Showing results for 
Search instead for 
Did you mean: 

Build crash when executed from CLI, Oculus XR Plugin and graphics API compatibility

masta-yoda
Protege
I can build my Unity3d VR from Unity Studio without any issues but when I execute the same build using CLI (batchmode), it crashes with the following error.

The command:
"C:\Program Files\Unity\Hub\Editor\2020.1.9f1\Editor\Unity.exe" -quit -batchmode -nographics -projectPath . -logFile tmpbuild.log -executeMethod CIBuild.BuildMyApp

The script:
BuildPipeline.BuildPlayer(scenes, build.apk, BuildTarget.Android, BuildOptions.None);

The error:
BuildFailedException: OpenGLES2, OpenGLES3, and Vulkan are currently the only graphics APIs compatible with the Oculus XR Plugin on mobile platforms.
  at UnityEditor.XR.Oculus.OculusPrebuildSettings.OnPreprocessBuild (UnityEditor.Build.Reporting.BuildReport report) [0x0005e] in C:\Sources\myapp\Library\PackageCache\com.unity.xr.oculus@1.5.0\Editor\OculusBuildProcessor.cs:176
  at UnityEditor.Build.BuildPipelineInterfaces+<>c__DisplayClass15_0.<OnBuildPreProcess>b__1 (UnityEditor.Build.IPreprocessBuildWithReport bpp) [0x00000] in <cdc1918cb795429dbbd46f2de52cb053>:0
  at UnityEditor.Build.BuildPipelineInterfaces.InvokeCallbackInterfacesPair[T1,T2] (System.Collections.Generic.List`1 oneInterfaces, System.Action`1 invocationOne, System.Collections.Generic.List`1 twoInterfaces, System.Action`1 invocationTwo, System.Boolean exitOnFailure) [0x000ff] in <cdc1918cb795429dbbd46f2de52cb053>:0 

It used to work before I upgraded from deprecated "XR Supported" to the "XR Plug-in Management" and latest Unity 2020.1. Please help to fix the CLI.
1 REPLY 1

masta-yoda
Protege
The Unity Support confirmed that the issue is known and tracked here:

https://issuetracker.unity3d.com/is...ent-than-the-current-active-one-in-the-editor