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
- Visible instance buffer returns 0 for every instance when using BatchDrawCommandIndirect on Adreno devices with Vulkan API
- [Android][Vulkan] Native crash in AndroidVulkanVideo::ProcessFrame and AndroidVulkanVideo::Context::~Context() when switching screens
- Screen brightness is not set to a default value when Screen.brightness is set to a negative value
- macOS app window title is not localized when built from generated Xcode project
- Unity Hub doesn't preserve the changed Channel when manually restarting the Hub
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.