Search Issue Tracker
By Design
By Design in 2023.3.X
Votes
0
Found in
2020.3.37f1
2021.3.6f1
2022.1.10f1
2022.2.0b2
2023.1.0a2
2023.2.0a1
2023.3.0a3
Issue ID
UUM-10375
Regression
No
Materials can not be modified when using ScriptedImporter
Reproduction steps:
- Open the attached project (“Bug.zip“)
- Select Assets/NewMat
- In the Inspector window check “Set Keyword” checkbox
- Click apply button
- Observe the color of the “NewMat” material
Expected results: The color of the material changes to green
Actual results: The color of the material stays red
Reproducible with: 2020.3.37f1, 2021.3.6f1, 2022.1.10f1, 2022.2.0b2, 2023.1.0a2
Reproducible on: Windows 11
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
- Font character thickness does not adjust properly in UI Toolkit text when changing Bold Weight in Font Asset
- Multiple "[...] is inaccessible due to its protection level" errors are thrown when opening project with Unity Version Control installed
- Sorting icons are tiny and misaligned in Import Activity window
- The Undo system does not record HideFlags.HideInHierarchy changes
- [Linux] Bug Reporter window is in Light mode when the Editor theme is Dark mode
Resolution Note:
Excerpt from the documentation page (https://docs.unity3d.com/ScriptReference/MaterialPropertyDrawer.html):
Toggle allows you to enable or disable a single shader keyword. It uses a float to store the state of the shader keyword, and displays it as a toggle. When the toggle is enabled, Unity enables the shader keyword; when the toggle is disabled, Unity disables the shader keyword.
You need to set a float on the material to change the keyword state.
Resolution Note (2023.3.X):
Excerpt from the documentation page (https://docs.unity3d.com/ScriptReference/MaterialPropertyDrawer.html):
Toggle allows you to enable or disable a single shader keyword. It uses a float to store the state of the shader keyword, and displays it as a toggle. When the toggle is enabled, Unity enables the shader keyword; when the toggle is disabled, Unity disables the shader keyword.
You need to set a float on the material to change the keyword state.