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
- Required SpriteMask class (ID 331) is stripped when "Strip Engine Code" is enabled
- “Maximized serialized file backup not found” error is thrown when minimizing a window in a newly opened project
- Build stack trace contains invalid lines when building with IL2CPP using scripts with delegates containing generic types in the signature
- Entities Systems window has a “Show Full Player Loop” dropdown which does nothing when clicked after enabling “Show Full Player Loop”
- Entities Hierarchy Search “Show/Hide” button’s Lens Icon is blurry when the Editor is on an external monitor
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.