Search Issue Tracker

By Design

Votes

0

Found in

2019.2.0a7

2019.2.8f1

2019.3

2020.1

Issue ID

1190046

Regression

Yes

Enum values can't be changed in the Inspector when saving them in a Scriptable Object asset

Inspector Framework

-

How to reproduce:
1. Open the user attached project
2. Create a Scriptable Object asset via Assets -> Create -> Enum Test
3. Open the created "New Enum Test" Scriptable Object in the Inspector
4. Change the Enum value

Expected results: The Enum value is changing
Actual results: The Enum value does not change

Reproducible with: 2019.2.0a7, 2019.2.12f1, 2019.3.0b10, 2020.1.0a12
Not reproducible with: 2017.4.34f1, 2018.4.13f1, 2019.2.0a6

Additional note: Enum in the MonoBehavior script attached to a GameObject can be changed in the Inspector without any issues.

  1. Resolution Note:

    Although the behaviour has changed in 2019.2, we will not attempt to fix this issue because there is a problem with the custom inspector itself.
    When going through SerializedObject/SerializedProperty it is necessary to call serializedObject.ApplyModifiedProperties().
    Although it was previously possible to see the value changing in the Inspector, this asset would not be actually be saved with the modification.
    A call to ApplyModifiedProperties() will solve both issues.

Comments (1)

  1. DarkSealer

    Sep 12, 2022 08:52

    The problem exists to this day (I'm using 2021.3.8f1) and the most interesting problem is that... I have a variable of that type and for some objects that value can change, but for others it just does not want to change no matter how many times I'll try.

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.