Search Issue Tracker
Fixed
Fixed in 6000.6.0a3
In Progress in 6000.0.X, 6000.3.X, 6000.4.X, 6000.5.X
Votes
27
Found in
6000.0.71f1
6000.3.11f1
6000.4.0f1
6000.5.0b1
6000.6.0a1
Issue ID
UUM-137398
Regression
Yes
ShaderVariantCollection.variantCount and ShaderVariantCollection.shaderCount returns 0 in Builds
Steps to reproduce:
1. Open the attached user's project "TestShaders.zip"
2. Switch to a Android/Windows Standalone Build profile
3. Perform a build of "Assets/Scenes/SampleScene.unity"
4. Open the Player.log once the Windows Player launches
5. See that "Variant count" and "Shader count" are returned as 0
Actual Result: ShaderVariantCollection.variantCount and ShaderVariantCollection.shaderCount returns 0 in Builds
Expected Result: variantCount and shaderCount return appropriate count
Reproducible with: 6000.0.71f1, 6000.3.12f1, 6000.4.0f1, 6000.5.0a4 (35ed6e8537f8), 6000.5.0b1, 6000.6.0a1
Not reproducible with: 6000.5.0a3 (d715b48dcd52)
Environment tested: Windows 11 25H2
Notes:
-There are no rendering issues, the count is returned as 0
-Issue is not reproducible in the Editor Play Mode
-Issue is reproducible in Windows Standalone Player, Android Player
-Issue is reproducible with OpenGLES3 and Vulkan on Android
Comments (2)
-
PallArinbj
Apr 08, 2026 13:47
Getting this fix for 6.0 would be super appreciated.
-
MeepMeep_Games
Apr 08, 2026 10:54
Please backport the fix to 6.3 (LTS)... this is a really jarring issue!
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
- Uninitialized variable warning appears in the Inspector of a custom shader when the variable is initialized
- "Failed creating toolbar element from ID..." error is thrown when resetting the Scene view Overlay layout while an Asset Transformer Toolbox overlay is active
- Entity ID for Font Assets is serialized twice which throws an error when using Debug Inspector
- Play Mode can be entered when disabling Adaptive Performance and pressing either the Play Mode button or the keyboard shortcut to enter Play Mode before recompilation leading to errors and warnings thrown
- Parent ListView element also becomes selected when inner ListView element is selected
Resolution Note:
Fixed in 6000.6.0a3
Resolution Note (fix version 6000.6.0a3):
Fixed in 6000.6.0a3