Build Failed - SubshaderIndex - 2022.1.23f1

Using Shader Graph, Built-in pipeline. Upon build for Windows 64bit - the following errors occurs:

ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: subshaderIndex
UnityEngine.Shader.FindSubshaderTagValue (System.Int32 subshaderIndex, UnityEngine.Rendering.ShaderTagId tagName) (at <f7bcd9bfa40c4821acdda68a85850616>:0)
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)
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)
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)
UnityEditor.Build.BuildPipelineInterfaces.OnPreprocessShaders (UnityEngine.Shader shader, UnityEditor.Rendering.ShaderSnippetData snippet, UnityEditor.Rendering.ShaderCompilerData[] data) (at <4ce403b7cdf744109283ae55cdc24285>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

And

Error building Player: ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: subshaderIndex

I have since unchecked “Auto API” for Windows, and am trying a build on Vulkan as of writing this.

Can confirm Vulkan didn’t work. Trying OpenGL 3

got to love when no one answers right :smile:

1 Like

Same issue over here! All of a sudden I just can’t compile builds anymore :confused:

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.

I believe it’ll be fixed in 2022.2 - which is releasing around Dec 22-23 ish.

like who cares about new versions, we need them working on these versions … cause i can bet these never versions will have other bugs …

1 Like

Related thread in the 2022 archived betas subforum: Build failed

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.

Shit, 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

2 Likes

Same Issue here, I returned back to 2021.3.14f

Yep same issue here sadly :(, time to roll back ig

Same

Same 2021.3.15f1

Same but on OSX. 2021.3.16f1

It wasn’t fixed in 2022.2.1f1 but it seems to be fixed in 2022.2.2f1.

Been over a month now, no update in sight… sigh

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.

Finally! 2021.3.17f1 got released today! Trying this new version and will let you know if that works now…

Alright guys, it’s all gone and fixed with 2021.3.17f1
Thanks

I got it fixed with 2021.3.17f1 too