Search Issue Tracker
By Design
Votes
0
Found in [Package]
10.0.0-preview.11
Issue ID
1261684
Regression
No
ShaderVariantCollection cannot be created the first time if a shader has a fallback shader
How to reproduce:
1. Open the attached project named "Case_12361684"
2. Right-click in the project view -> Create -> CUSTOM_NAME (Edits below)
3. Observe the error in the console window
4. Repeat Step 2
5. Observe that the Shader Variant Collection was created this time
Expected result: Shader Variant Collection is created on the first time
Actual result: It takes two tries to create a Shader Variant Collection
Reproducible with: 2019.4.4f1(7.3.1, 7.4.1), 2020.1.0b15(8.1.0, 9.0.0-preview.35), 2020.2.0a18(10.0.0-preview.11)
Could not test with: 2018.4.25f1(URP was not yet available and the project would not downgrade due to custom packages)
Notes:
1. The issue re-occurs every time the project is launched
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
- DownloadHandlerScript.CompleteContent is called twice when building for WebGL
- Scene view has Y coordinates of the Screen Position node flipped when some of the URP features are disabled
- Volumetric fog shader variants are missing from build when "Strict Shader Variant Matching" is disabled
- Unnecessary modifications clutter the Scene when using a RectTransform driven by a LayoutGroup in a Prefab
- Files in the target folder are deleted without a proper warning when building an iOS project
Resolution Note:
The user side scripts gather shader variants right after loading SRP assets, which resets the pipeline.
Restoring the asset and making the main camera render things once forces the shaders to reset their state. Shader data can be safely analysed after doing this.