Search Unity

Bug Build Failed - SubshaderIndex - 2022.1.23f1

Discussion in 'Editor & General Support' started by AGS_Five, Dec 5, 2022.

  1. AGS_Five

    AGS_Five

    Joined:
    Jul 18, 2019
    Posts:
    9
    Using Shader Graph, Built-in pipeline. Upon build for Windows 64bit - the following errors occurs:

    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 <f7bcd9bfa40c4821acdda68a85850616>:0)
    4. UnityEditor.Rendering.BuiltIn.ShaderPreprocessor.IsShaderGraphShader (UnityEngine.Shader shader, UnityEditor.Rendering.ShaderSnippetData snippetData) (at Library/PackageCache/com.unity.shadergraph@13.1.8/Editor/Generation/Targets/BuiltIn/Editor/ShaderPreprocessor.cs:114)
    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@13.1.8/Editor/Generation/Targets/BuiltIn/Editor/ShaderPreprocessor.cs:284)
    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@13.1.8/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 <4ce403b7cdf744109283ae55cdc24285>:0)
    8. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
    9.  
    And

    Code (CSharp):
    1. Error building Player: ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
    2. Parameter name: subshaderIndex
    I have since unchecked "Auto API" for Windows, and am trying a build on Vulkan as of writing this.
     
  2. AGS_Five

    AGS_Five

    Joined:
    Jul 18, 2019
    Posts:
    9
    Can confirm Vulkan didn't work. Trying OpenGL 3
     
  3. gatisp09

    gatisp09

    Joined:
    Nov 24, 2021
    Posts:
    40
    got to love when no one answers right :D
     
  4. noonoox

    noonoox

    Joined:
    Nov 15, 2014
    Posts:
    21
    Same issue over here! All of a sudden I just can't compile builds anymore :/
     
  5. gatisp09

    gatisp09

    Joined:
    Nov 24, 2021
    Posts:
    40
    got to love unity right ?! best thing is that no one seems to be bothered to even replay or point to any other thread where u might find a solution.
     
  6. AGS_Five

    AGS_Five

    Joined:
    Jul 18, 2019
    Posts:
    9
    I believe it'll be fixed in 2022.2 - which is releasing around Dec 22-23 ish.
     
  7. gatisp09

    gatisp09

    Joined:
    Nov 24, 2021
    Posts:
    40
    like who cares about new versions, we need them working on these versions ... cause i can bet these never versions will have other bugs ...
     
    RSH1 likes this.
  8. nitz

    nitz

    Joined:
    May 4, 2011
    Posts:
    54
    Related thread in the 2022 archived betas subforum: https://forum.unity.com/threads/build-failed.1366836/

    For my case:

    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.
     
  9. valentin56610

    valentin56610

    Joined:
    Jan 22, 2019
    Posts:
    156
    S***, I was in 2021.3.14f1 and all was good, just updated to 2021.3.16f1 and I cannot build anymore either... God damnit Unity! What the hell
     
  10. AAK_Lebanon

    AAK_Lebanon

    Joined:
    May 30, 2015
    Posts:
    77
    Same Issue here, I returned back to 2021.3.14f
     
  11. JackLyter

    JackLyter

    Joined:
    Aug 27, 2021
    Posts:
    1
    Yep same issue here sadly :(, time to roll back ig
     
  12. bz_apps

    bz_apps

    Joined:
    Aug 19, 2014
    Posts:
    70
  13. RSH1

    RSH1

    Joined:
    Jul 9, 2012
    Posts:
    256
    Same 2021.3.15f1
     
  14. unity_F293C934EB7F9FA9AFB4

    unity_F293C934EB7F9FA9AFB4

    Joined:
    Jan 4, 2023
    Posts:
    1
    Same but on OSX. 2021.3.16f1
     
  15. Chickenbob5

    Chickenbob5

    Joined:
    Apr 1, 2022
    Posts:
    6
    It wasn't fixed in 2022.2.1f1 but it seems to be fixed in 2022.2.2f1.
     
  16. valentin56610

    valentin56610

    Joined:
    Jan 22, 2019
    Posts:
    156
    Been over a month now, no update in sight... *sigh*
     
  17. bz_apps

    bz_apps

    Joined:
    Aug 19, 2014
    Posts:
    70
    For me, I found that my graphics settings were missing. I think I created a scene using the 2d template. It didn't have the correct URP settings so I created new ones and this fixed it for me.
     
  18. valentin56610

    valentin56610

    Joined:
    Jan 22, 2019
    Posts:
    156
    Finally! 2021.3.17f1 got released today! Trying this new version and will let you know if that works now..
     
  19. valentin56610

    valentin56610

    Joined:
    Jan 22, 2019
    Posts:
    156
    Alright guys, it's all gone and fixed with 2021.3.17f1
    Thanks
     
  20. mekury

    mekury

    Joined:
    Aug 16, 2021
    Posts:
    1
    I got it fixed with 2021.3.17f1 too
     
  21. daniutang

    daniutang

    Joined:
    Feb 14, 2023
    Posts:
    1
    Hi, I'm using 2022.1.23f1 and facing the same issue, could you shed some light on what were the URP settings you changed? :)
    I could build successfully if I removed URP entirely from the project, but then when I run the apk I got a black screen...
     
  22. ISTA33

    ISTA33

    Joined:
    Apr 2, 2020
    Posts:
    8
    this problem Comes from Shader Compile in unity, Seems Like You added new Shader or an assets witha shader or anything have to do with shaders.

    Anyway The Solution is:
    1- copy Assets Folder To Desktop
    2- create new Empty Project - When Done - close unity and Unity Hub
    3- Replace the new Project assets folder with your folder
    4- open that project
    5- check build settings and set the info again because you'll find everything as default
    6- F***ing build :)