Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  3. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Bug Build failed

Discussion in '2022.2 Beta' started by magsoftware, Nov 28, 2022.

  1. magsoftware

    magsoftware

    Joined:
    Feb 7, 2019
    Posts:
    122
    I've got this errors when I try to build for Android:
    Code (CSharp):
    1. ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
    2. Parameter name: subshaderIndex
    3. UnityEngine.Shader.FindSubshaderTagValue (System.Int32 subshaderIndex, UnityEngine.Rendering.ShaderTagId tagName) (at <07b4fb2b5af74e479c2c24afaabbcaa4>:0)
    4. UnityEditor.Rendering.BuiltIn.ShaderPreprocessor.IsShaderGraphShader (UnityEngine.Shader shader, UnityEditor.Rendering.ShaderSnippetData snippetData) (at Library/PackageCache/com.unity.shadergraph@14.0.3/Editor/Generation/Targets/BuiltIn/Editor/ShaderPreprocessor.cs:113)
    5. UnityEditor.Rendering.BuiltIn.ShaderPreprocessor.StripUnused (UnityEditor.Rendering.BuiltIn.ShaderFeatures features, UnityEngine.Shader shader, UnityEditor.Rendering.ShaderSnippetData snippetData, UnityEditor.Rendering.ShaderCompilerData compilerData) (at Library/PackageCache/com.unity.shadergraph@14.0.3/Editor/Generation/Targets/BuiltIn/Editor/ShaderPreprocessor.cs:283)
    6. UnityEditor.Rendering.BuiltIn.ShaderPreprocessor.OnProcessShader (UnityEngine.Shader shader, UnityEditor.Rendering.ShaderSnippetData snippetData, System.Collections.Generic.IList`1[T] compilerDataList) (at Library/PackageCache/com.unity.shadergraph@14.0.3/Editor/Generation/Targets/BuiltIn/Editor/ShaderPreprocessor.cs:348)
    7. UnityEditor.Build.BuildPipelineInterfaces.OnPreprocessShaders (UnityEngine.Shader shader, UnityEditor.Rendering.ShaderSnippetData snippet, UnityEditor.Rendering.ShaderCompilerData[] data) (at <d5cfe1b7a8b8455dae78439447671342>:0)
    8. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
    9.  
    10.  
    11. UnityEditor.BuildPlayerWindow+BuildMethodException: 9 errors
    12.   at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x002da] in <d5cfe1b7a8b8455dae78439447671342>:0
    13.   at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in <d5cfe1b7a8b8455dae78439447671342>:0
    14. UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
    15.  
     
  2. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    2,983
    Hi!
    We have a fix in the queue.
    In the meanwhile, you can try to set the graphics API for the Editor to be the same as what you have in Android as a workaround.
     
  3. magsoftware

    magsoftware

    Joined:
    Feb 7, 2019
    Posts:
    122
    If I set Target API Level to 30 (ANDROID 11) the game cannot be played on devices with Android 12-13?
     
  4. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    2,983
    That's not the graphics API.
     
  5. magsoftware

    magsoftware

    Joined:
    Feb 7, 2019
    Posts:
    122
    upload_2022-11-28_15-50-35.png
     
  6. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    2,983
    Right - now go to the Standalone player settings (Windows if you're on Windows), select Vulkan there as well and restart the Editor.
     
  7. magsoftware

    magsoftware

    Joined:
    Feb 7, 2019
    Posts:
    122
    How can I do that? Where is 'STANDALONE PLAYER SETTINGS' ?
     
  8. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    2,983
    Project settings -> Player settings -> Settings for Windows, Mac, Linux. There's "Auto Graphics API for Windows" checkbox - if you're on Windows - uncheck it and select Vulkan as the top API. Then restart the Editor.
     
  9. magsoftware

    magsoftware

    Joined:
    Feb 7, 2019
    Posts:
    122
    Same:
    Code (CSharp):
    1. ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
    2. Parameter name: subshaderIndex
    3. UnityEngine.Shader.FindSubshaderTagValue (System.Int32 subshaderIndex, UnityEngine.Rendering.ShaderTagId tagName) (at <07b4fb2b5af74e479c2c24afaabbcaa4>:0)
    4. UnityEditor.Rendering.BuiltIn.ShaderPreprocessor.IsShaderGraphShader (UnityEngine.Shader shader, UnityEditor.Rendering.ShaderSnippetData snippetData) (at Library/PackageCache/com.unity.shadergraph@14.0.3/Editor/Generation/Targets/BuiltIn/Editor/ShaderPreprocessor.cs:113)
    5. UnityEditor.Rendering.BuiltIn.ShaderPreprocessor.StripUnused (UnityEditor.Rendering.BuiltIn.ShaderFeatures features, UnityEngine.Shader shader, UnityEditor.Rendering.ShaderSnippetData snippetData, UnityEditor.Rendering.ShaderCompilerData compilerData) (at Library/PackageCache/com.unity.shadergraph@14.0.3/Editor/Generation/Targets/BuiltIn/Editor/ShaderPreprocessor.cs:283)
    6. UnityEditor.Rendering.BuiltIn.ShaderPreprocessor.OnProcessShader (UnityEngine.Shader shader, UnityEditor.Rendering.ShaderSnippetData snippetData, System.Collections.Generic.IList`1[T] compilerDataList) (at Library/PackageCache/com.unity.shadergraph@14.0.3/Editor/Generation/Targets/BuiltIn/Editor/ShaderPreprocessor.cs:348)
    7. UnityEditor.Build.BuildPipelineInterfaces.OnPreprocessShaders (UnityEngine.Shader shader, UnityEditor.Rendering.ShaderSnippetData snippet, UnityEditor.Rendering.ShaderCompilerData[] data) (at <d5cfe1b7a8b8455dae78439447671342>:0)
    8. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
     

    Attached Files:

    Last edited: Nov 29, 2022
  10. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    2,983
    That's "Universal Windows" platform. The rightmost one.
    You need to change the leftmost one, with a screen icon.
     
  11. magsoftware

    magsoftware

    Joined:
    Feb 7, 2019
    Posts:
    122
    Yes, I did it.. I've posted the wrong screenshot. But it still doesn't work.. I've still got those errors
     
  12. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    2,983
    Can you try removing GLES3 from the Android player settings temporarily?
     
  13. magsoftware

    magsoftware

    Joined:
    Feb 7, 2019
    Posts:
    122
    Same errors
     
  14. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    2,983
    Then I can only suggest to wait till the fix is there. Sorry for the inconvenience.
     
    magsoftware likes this.
  15. AGS_Five

    AGS_Five

    Joined:
    Jul 18, 2019
    Posts:
    9
    Any news on a fix for this, but for Built-in, target Windows 64? I'm getting the same issue 2022.1.23f.
     
  16. magsoftware

    magsoftware

    Joined:
    Feb 7, 2019
    Posts:
    122
    I did not find any solution. I am still waiting for this. If you will find something, please let me know :)
     
  17. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    2,983
    The fix will appear in 2022.2.2f1
     
    brian_imvizar and AGS_Five like this.
  18. AGS_Five

    AGS_Five

    Joined:
    Jul 18, 2019
    Posts:
    9
    Do we have an expected release date for this?
     
  19. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    2,983
    Yes, around Dec 21-22
     
    AGS_Five likes this.
  20. AGS_Five

    AGS_Five

    Joined:
    Jul 18, 2019
    Posts:
    9
    Thank you for the quick response, hugely appreciated!
     
    aleksandrk likes this.
  21. DaveCowling

    DaveCowling

    Joined:
    Oct 10, 2017
    Posts:
    7
    This is also broken in 2021.3.15f1. When will the "stable" LTS stream get the fix?
     
    Strangestio and Walter_Hulsebos like this.
  22. mottzy

    mottzy

    Joined:
    Dec 29, 2019
    Posts:
    6
    I'm seeing this issue for 2021.2 builds as well. Is there really no work around or patch for these unity versions? I'm not building to Android, but a different handheld device.
     
  23. bantam

    bantam

    Joined:
    Oct 19, 2019
    Posts:
    1
    For me addressables were failing to build because of this. I was able to workaround this bug in 2022.2.0f1 by unchecking Auto Graphics API and using only a single Graphics API (Direct3D 11), deleting the others. Not ideal but works until there is a fix.

    Edit: Did another couple builds out of curiosity. Seems to build fine when I add back Direct3D 12 also but fails when I add vulkan back so I have removed vulkan for now.
     
    Last edited: Dec 10, 2022
  24. nitz

    nitz

    Joined:
    May 4, 2011
    Posts:
    54
    2021.2.16f1 dropped yesterday and still suffers from this. Rolling back to 2021.2.14f1 seems to be the only workaround at the moment, as adjusting the graphics API for the editor didn't seem to resolve it.
     
  25. faizpatel81528

    faizpatel81528

    Joined:
    Dec 10, 2022
    Posts:
    14
    Is the fix out yet?
    My target platform is Android.
     
  26. Chrisdbhr

    Chrisdbhr

    Joined:
    May 21, 2016
    Posts:
    19
    I got the same error when trying to build Standalone Windows with Vulkan as main Graphics API, Unity 2021.3.16f1
     
  27. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    2,983
    2021.3.17f1 will have the fix.
     
    Chrisdbhr likes this.
  28. faizpatel81528

    faizpatel81528

    Joined:
    Dec 10, 2022
    Posts:
    14
    my error got fixed by deleting URP,
    Shadergraph was causing the error.
     
    chelnok likes this.
  29. redwren

    redwren

    Joined:
    Aug 2, 2019
    Posts:
    69
    We're stuck on this issue in 2022.2.1, and the Entities package requires 2022.2 so we can't upgrade one without the other. Any update on the 2022.2.2 release date?
     
  30. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    2,983
    @redwren it should be out soonish, hopefully this week.
     
    Ceylan12 and redwren like this.
  31. Ceylan12

    Ceylan12

    Joined:
    Dec 24, 2016
    Posts:
    113
    Hi, I'm just curious about what is the planned released date for 2021.3.17f1.
     
    Last edited: Jan 23, 2023
  32. faizpatel81528

    faizpatel81528

    Joined:
    Dec 10, 2022
    Posts:
    14
    What's your platform?
     
  33. RedForceFT

    RedForceFT

    Joined:
    Aug 5, 2019
    Posts:
    19
    same issue on unity v2022.2.0b16