Search Issue Tracker
By Design
Votes
0
Found in
2022.3.62f1
6000.0.48f1
6000.1.3f1
6000.2.0b1
Issue ID
UUM-105170
Regression
No
Unexpected Material change/transparency when switching between ShaderGraph and material at runtime in HDRP
Reproduction steps:
1. Open the attached “IN-101574.zip” project
2. Open the “OutdoorsScene”
3. Enter Play mode
4. Observe the Quad material in the Game view
5. Press “T” on the keyboard
6. Repeat the 4th and 5th steps
7. Observe the Quad material
Expected result: The material remains white/not transparent
Actual result: The material turns transparent/gray
Reproducible with: 2022.1.0a1, 2022.3.62f1, 6000.0.48f1, 6000.1.3f1, 6000.2.0b1
Reproducible on: Windows 10 (User reported), Windows 11
Not reproducible on: no other environment tested
Notes:
- Pressing “T” switches between “Material 1” and “Shader 1” referenced on the “LoadObjectRuntime” GameObject, and switching back from “Shader 1” to “Material 1” produces the problematic behavior
- Could not reproduce with URP, only reproducible with HDRP
- Also reproducible in the Player
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
- The sidebar reopens when Unity Hub is started when Unity Hub was closed with the sidebar closed
- Characters are invisible in the TextField when certain Japanese characters are used
- "InvalidOperationException" is thrown when using Prefab > Replace to replace a Canvas GameObject with a Prefab that has an incompatible root Transform type
- Looping AudioSource resumes from the wrong playback position when the app is backgrounded and resumed on iOS Safari
- "AnyState Transition Created" action can be undone when pressing "Auto Generate Animation" on the uGUI GameObjects
Resolution Note:
It seems like you are not setting up your dynamically created materials correctly. When you change the underlying shader, you are creating a new material instance that does not have the same properties. The properties cannot be copied because it is not the same underlying shader. You need to setup all the material properties again if you change the underlying shader.