Search Issue Tracker
By Design
By Design in 2023.2.X
Votes
0
Found in
2023.1.0b8
2023.2.0a6
Issue ID
UUM-31225
Regression
No
GameObject Material is not rendered when building an asset bundle containing the Material with URP shader
How to reproduce:
1. Open the “AssetBundleBugRepro.zip“ project
1.1 Erase the Libray folder
2. Open “Window > Bug Repro Editor Window” from the menu bar
3. In the “Target Object“ ObjectField select the “Cube“ Prefab
4. Press ”Build to Bundle” on the “Bug Repo Editor Window“
5. Press ”Load and Instantiate” on the “Bug Repo Editor Window“
6. Select “cube.unity3d“ in the StreamingAssets folder
7. Observe the “Cube(Clone)“ GameObject
Expected result: The “Cube(Clone)“ GameObject has a gray Texture
Actual result: The “Cube(Clone)“ GameObject is pink
Reproducible with: 2023.1.0b8, 2023.2.0a6
Could not test with: 2020.3.46f1, 2021.3.21f1, 2022.2.11f1 (Could not compile shader variants)
Reproducible on: Windows 10
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
- Texture2D hash changes inside of an AssetBundle when rebuilding a SpriteAtlas bundle with an empty AssetPostprocessor Script enabled
- Aniso Level still applies when Generate MipMap is disabled in Texture Import Settings
- Mipmap Limit Groups long names are not truncated when creating a new Mipmap Limit Group with a long name
- “ArgumentException: Invalid double parameter.” error is thrown when Infinity is typed into the Fixed Timestep field
- GameObject becomes gray when using HDRP and STP together on macOS
Resolution Note:
Having the URP/lit shader in the Graphics Always Include category forces Unity to calculate all shader variants. For a player build this takes ages, and for the AssetBundle build there is a failure "Lit has too many Shader variants (20054016)." The recommended solution is to follow the recommendation in the error message to remove the shader from the always include list. When done the AssetBundle build can selectively compile just the variants that are needed and succeed. When done the cube is grey instead of pink in the provided project.
Resolution Note (2023.2.X):
Having the URP/lit shader in the Graphics Always Include category forces Unity to calculate all shader variants. For a player build this takes ages, and for the AssetBundle build there is a failure "Lit has too many Shader variants (20054016)." The recommended solution is to follow the recommendation in the error message to remove the shader from the always include list. When done the AssetBundle build can selectively compile just the variants that are needed and succeed. When done the cube is grey instead of pink in the provided project.