Search Issue Tracker
By Design
Votes
0
Found in
2019.1.0b1
2019.1.7f1
2019.2.0a1
2019.3.0a1
Issue ID
1169908
Regression
No
[UIElements] MinMaxField values in the inspector are not updated when using a slider
How to reproduce:
1. Open the attached project ("case_1169908-Test.zip")
2. Open BugReport > MinMaxField tab
3. Double click on the "(Rotation)" field to open in the inspector
4. Expand the "Limits" field to see "Min" and "Max" values
5. Move Max/Min slider value to one direction
6. See in the inspector and in the console logs that the value is updated
7. Move the other value to the same direction as the previous slider
8. Inspect that inspector values does not update, even though console logs show that values do change
Expected results: Inspector values are updated
Actual results: Inspector values sometimes are not updated; the console logs show that values do change
Reproducible with: 2019.1.11f1, 2019.2.0b10, 2019.3.0a10
Couldn't test with versions up to 2019.1.0b1 because of project errors after downgrade
Note:
This issue does not always reproduce - highest reproduction rates were when moving the slider quickly, or when moving both sliders in the same direction.
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
- Rename is enabled on subfolder empty space - "Can't rename to empty name" warning
- SamplerState Property Missing Anisotropic Filtering
- Visual glitches when using Handles API
- The RGBA color values are inconsistent when comparing two identical colors set in the Inspector
- Weird behaviour in TextMeshPro Link Example sample when hovering over single letters after hovering over a word
Resolution Note:
This issue occurs because there are some changes being done the Rotation object in two "concurrent" ways.
The UIElements bindings are going through the SerializedObject/SerializedProperty API which will erase all changes that are being done directly to the object.
Specifically what happens here is that interacting with the MinMaxSlider writes to the "limits" property directly but changing the Slider.lowLimit will clamp the value and since the Slider is bound, it will go through SerializedProperty and call SerializedProperty.ApplyModifiedProperties() which will "forget" whatever was written to the object before.
One way around this is to also use the SerializedProperty API to write to the limits when the MinMaxSlider is changed.