Search Issue Tracker
Fixed in 6000.5.0a6
Fixed in future release
Votes
1
Found in
2022.3.39f1
6000.0.12f1
6000.1.0a7
6000.2.0a1
6000.3.0a1
6000.4.0a1
6000.5.0a1
Issue ID
UUM-76775
Regression
No
"Material.EnableKeyword" method has no effect on the material when calling it on the manually instanced material
How to reproduce:
1. Open the “Set Material Keyword Bug 2“ project
2. Open the “SampleScene“
3. Enter the Play Mode
4. Observe the “Manual Instantiate (1)“ GameObject and the Console window
Expected result: The “Manual Instantiate (1)“ GameObject top turns green and no messages are logged in the Console window
Actual result: The “Manual Instantiate (1)“ GameObject top stays red and “Keyword not enabled …” messages logged in the Console window
Reproducible with: 2022.3.39f1, 6000.0.12f1
Could not test with: 2021.3.41f1 (“Renderer.SetMaterials“ and “Renderer.SetSharedMaterials“ methods are not implemented)
Reproducible on: macOS 14.5 (Intel), Windows 10 Pro (22H2)
Not reproducible on: No other environments tested
Workaround: Add the “{{material.shader = material.shader}}“ code snippet before calling “{{material.EnableKeyword(Keyword)}}“, when manually instantiating the material
Note: When using Material Variants the workaround works as expected for them, but the behavior of the original material is opposite. The instancing without a workaround works as correctly, but with the workaround works incorrectly
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 warning in 'Hidden/Light2D': implicit truncation of vector type" is thrown when building Universal 2D template
- AI Assistant breaks compilation of packages using System.Runtime.CompilerServices.Unsafe via auto-referencing
- Unity Hub checks the "Documentation" module by default on the 6.4 and 6.5 streams despite that it was unchecked with the previous installs
- Shortcut that toggles between Dopesheet and Curves Views in the Animation Window's Timeline is mislabed
- Property List Items Overlap onto the Property List's top edge when scrolling through a long Property List
Resolution Note (fix version 6000.5.0a6):
Fixed in 6000.5.0a6
Resolution Note (fix version future release):
Fixed in 6000.5.0a6