Search Issue Tracker
By Design
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
- [Render Graph Viewer] Resource list icons cropped and in inconsistent positions
- Scene View with Debug Draw Mode enabled is gray when GPU Resident Drawer is enabled
- The UI is not visible when resizing out of focus built Player window with Application.runInBackground set to false
- [Linux] "Error while reading movie" errors are thrown when opening templates
- Shader warnings are being thrown after building Mixed Reality Template
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.