Search Issue Tracker
By Design
Votes
3
Found in
2023.1.0a1
2023.2.0a1
Issue ID
UUM-3277
Regression
No
The Material's shader is not fully set when switching the shader in Player
How to reproduce:
1. Open the attached project "ShaderSystemIssue.zip"
2. Open the "SampleScene" Scene
3. Build And Run (File > Build And Run)
4. When the Player loads press the Button labeled "Button" two times
Expected result: The Material of the "Cube" GameObject switches to "Lit"
Actual result: The Material of the "Cube" GameObject becomes transparent
Reproducible with: 2019.4.38f1, 2020.3.34f1, 2021.3.2f1, 2022.1.0f1, 2022.2.0a12
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
- Mono Windows Builds don't produce full log callstacks when generating logs
- AssetBundles fail to load when running in Built Players for Mobile Devices
- UI elements with text gets bigger and grey when Player window is moved to another screen with different resolution
- System name accepts multiline text but crops it on confirmation, duplicates input, and shrinks the field when empty
- UI element scale and position are wrong in project build when DRS is changed with HDR and Software Dynamic Resolution enabled
Resolution Note:
When setting the shader, the customRenderQueue is resetted in the material. So when the user set it back to the previous shader, the visual is different because the customRenderQueue is resetted to use the default one.
What is happening here is the intended behavior according to the [documentation |http://example.com]:
"Note that if a shader on the material is changed, the render queue resets to that of the shader itself."
The recommendation here would be to let the user know that he should also set the customRenderPass when setting the shader if he doesn't want to use the default shader one.