NaughtyAttributes icon indicating copy to clipboard operation
NaughtyAttributes copied to clipboard

[Issue] OnValidate() is not called when the value of a dropdown changes

Open dbrizov opened this issue 6 years ago • 3 comments

dbrizov avatar Mar 10 '20 20:03 dbrizov

I've discovered what I think is another (arguably worse) quirk here, that may be related: If you use the Dropdown attribute to update a value on a ScriptableObject, the change is only cached locally, and not serialized to the asset until you also change some other attribute on the asset.

fmoo avatar Mar 15 '20 04:03 fmoo

Seconding this, not serialized is the bigger issue. I'm not even using it on a serialized object but just on a MonoBehavior but the changed value is not saved.

kjyv avatar Jun 17 '21 15:06 kjyv

Yep, using [Dropdown] in a ScriptableObject has serious drawback, and can even crash Unity sometimes if we change it during play mode, not sure if it's a bug in Unity or just bad implementation.

bitinn avatar Feb 17 '22 10:02 bitinn