Search Issue Tracker
Fixed
Votes
0
Found in
2021.3.17f1
2022.2.5f1
2023.1.0b3
2023.2.0a1
Issue ID
UUM-27610
Regression
Yes
Keywords are not being set when using Material.shaderKeywords from ShaderGUI
Steps to reproduce:
1. Open the attached project “KeywordBug“
2. Select the “Assets/Mat.mat“ Material
3. Set the Shader to “Assets/TestUnlit.shader“
4. Change the Inspector window mode to Normal (click the “3 dots” icon next to the “lock“ icon)
5. Enable the “Use Color 2“ option
6. Change the Inspector window mode to Debug
7. COLOR2 is listed in the Valid Keywords list
8. Change the Inspector window mode to Normal
9. Modify the Color2 color
10. Change the Inspector window mode to Debug
11. Observe the Valid Keywords list
Expected result: COLOR2 is listed under Valid Keywords
Actual result: COLOR2 is not listed under Valid Keywords, despite the "Use Color 2" toggle being on
Reproducible with: 2021.2.18f1, 2021.2.19f1, 2021.3.17f1, 2022.2.5f1, 2023.1.0b3, 2023.2.0a1
Not reproducible with: 2020.3.45f1, 2021.2.17f1
Reproducible on: Windows 10
Notes:
1. Material color reverts to “Color“ when pressing CTRL + S after step 8
2. Look at the attached video for clarity
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
- Shader Graph Asset icon is not shown on creation unless you confirm the name
- APV Sky occlusion doesn't consider the terrain
- [iOS] "EXC_BAD_ACCESS" Player crash when Script Debugging is enabled
- Cursor skips input fields when tabbing between two sets of input fields
- "Shader error redefinition of 'Varyings'" error appears when selecting the shader
Resolution Note:
Fixed by https://issuetracker.unity3d.com/product/unity/issues/guid/UUM-27639