Search Unity

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

Discussion in 'VR' started by masta-yoda, Oct 16, 2020.

  1. masta-yoda

    masta-yoda

    Joined:
    Apr 19, 2020
    Posts:
    91
    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:
    Code (CSharp):
    1. "C:\Program Files\Unity\Hub\Editor\2020.1.9f1\Editor\Unity.exe" -quit -batchmode -nographics -projectPath . -logFile tmpbuild.log -executeMethod CIBuild.BuildMyApp
    The script:
    Code (CSharp):
    1. BuildPipeline.BuildPlayer(scenes, build.apk, BuildTarget.Android, BuildOptions.None);
    The error:
    Code (CSharp):
    1. BuildFailedException: OpenGLES2, OpenGLES3, and Vulkan are currently the only graphics APIs compatible with the Oculus XR Plugin on mobile platforms.
    2.   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
    3.   at UnityEditor.Build.BuildPipelineInterfaces+<>c__DisplayClass15_0.<OnBuildPreProcess>b__1 (UnityEditor.Build.IPreprocessBuildWithReport bpp) [0x00000] in <cdc1918cb795429dbbd46f2de52cb053>:0
    4.   at UnityEditor.Build.BuildPipelineInterfaces.InvokeCallbackInterfacesPair[T1,T2] (System.Collections.Generic.List`1[T] oneInterfaces, System.Action`1[T] invocationOne, System.Collections.Generic.List`1[T] twoInterfaces, System.Action`1[T] invocationTwo, System.Boolean exitOnFailure) [0x000ff] in <cdc1918cb795429dbbd46f2de52cb053>:0
    5.  
    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.
     
  2. masta-yoda

    masta-yoda

    Joined:
    Apr 19, 2020
    Posts:
    91
  3. Shaunyowns

    Shaunyowns

    Joined:
    Nov 4, 2019
    Posts:
    328
    As @masta-yoda, has mentioned above, we believe this is a known issue. This issue has been resolved and will be fixed in the next version of the Oculus XR Plug-in (1.6.0). Please update to that version once it is available.