Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

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

Discussion in 'EditorXR' started by masta-yoda, Oct 15, 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. amirebrahimi_unity

    amirebrahimi_unity

    Unity Technologies

    Joined:
    Aug 12, 2015
    Posts:
    400
  3. masta-yoda

    masta-yoda

    Joined:
    Apr 19, 2020
    Posts:
    91
  4. masta-yoda

    masta-yoda

    Joined:
    Apr 19, 2020
    Posts:
    91