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
- Out-of-bounds memory access with multiple CanvasRenderers under a Canvas when using Mesh API
- Inspector tries to access file after it was deleted when the file was locked in Inspector window
- Changing Transform values in Search window Inspector loses focus while dragging and stopping mouse without releasing dragging action
- Saving changes on the dirty VFX Graph during the Play mode throws "The referenced script (Unknown) on this Behaviour is missing!" warnings
- VFX Graph Debug Info overlaps the "Initialize" block debug info by default
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.