Search Issue Tracker
By Design
Votes
3
Found in
2023.1.0a1
2023.2.0a1
Issue ID
UUM-3284
Regression
No
ShaderVariant throws 'ArgumentException: shader pass type 0 does not have a shader snippet' when using AssetBundle
Reproduction steps:
1. Open the attached 'TestShaderVariant' project
2. Open the 'SampleScene'
3. Go to the 'Window -> Asset Management -> Addressables'
4. 'Build -> Clean Build -> All'
5. 'Build -> New Build -> Default Build Script'
6. 'Play Mode Script -> Use Existing Build'
7. Enter Play mode
Expected result: No errors are in the Console
Actual result: 'ArgumentException: shader Unlit/NewUnlitShader pass type 0 does not have a shader snippet' is in the Console
Reproducible with: 2019.4.36f1, 2020.3.30f1, 2021.2.14f1, 2022.1.0b13, 2022.2.0a8
Public Tracker Link:
https://issuetracker.unity3d.com/product/unity/issues/guid/1412344/
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Joint Physics result in unexpected behaviors when used for articulated vehicles like buses or trucks
- Standalone Player crashes with "TDerived GetOrLoad<TDerived>() where TDerived : T" when IL2CPP Code generation is set to "Faster (smaller) Builds"
- IndexOutOfRangeException and InvalidOperationException when logging XML string
- Script missing in "Assets/Settings/Mobile_Renderer/GlobalVolumeFeature" of "com.unity.template.urp-blank" template
- “Font Asset Creator - Error Code [Invalid_File_Structure]…“ error is logged when generating Font Assets from fonts which worked with TMP Font Asset Creator
Resolution Note:
When a shader is part of an asset bundle, there is not enough information for the Editor to do all the checks it normally does (the source asset is missing in this case).
It's best to create those variant collections in the Editor as assets, and not build them at player runtime.