Search Issue Tracker
Won't Fix
Votes
0
Found in
2019.2
2019.2.2f1
2019.3
2020.1
Issue ID
1196013
Regression
No
UIElements Range does not work when field is set to float
How to reproduce:
1. Open attached project ("RangeBug.zip")
2. Open SampleScene scene
3. Select TestObj Game object
4. Open Inspector window
5. In Test Component change Value field to anything outside [0;10] range
Expected result: Value in Value field is constrained by [0;10] range
Actual result: Value in Value field is not constrained by [0;10] range
Reproducible with: 2019.2.12f1, 2019.3.0b10, 2020.1.0a12
Not reproducible with: 2017.4.34f1, 2018.4.12f1 (CreateInspectorGUI can not be overridden)
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
- Articulation Body with 'Revolute' Joint Type has erratic behavior when Upper Limit is set to above 360
- WebGL Player fails to render Scene when Terrain with Detail Mesh is added and WebGPU Graphics API is used
- Inconsistent errors are logged when different types are passed into the Query "Q<>" method in UIToolkit and the ancestor VisualElement is null
- Crash on GetMaterialPropertyByIndex when opening a specific Scene
- Discrepancies in the styling are present when using a TSS file instead of a USS file in custom EditorWindow
Resolution Note (2020.1.X):
The reason for the described behavior is because the binding system subscribed to the same ValueChangedCallback. There is no mechanism that would allow us to make sure the binding system will get ValueChangedCallback before the user code.
To achieve the correct result, use the OnValidate function.
https://docs.unity3d.com/ScriptReference/MonoBehaviour.OnValidate.html