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

Shader System

-

Reproduction steps:

  1. Open the attached project (“Bug.zip“)
  2. Select Assets/NewMat
  3. In the Inspector window check “Set Keyword” checkbox
  4. Click apply button
  5. 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

  1. 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.

  2. 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.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.