Search Issue Tracker
Fixed in 2022.2.X
Votes
0
Found in
2021.2.0a10
Issue ID
1376791
Regression
No
Inspector math expressions like +=X evaluate incrementally for every new typed character: +=333 results in 369
Since Unity 2021.2 the inspector got ability to evaluate better math expressions. For example, entering "+=3" adds 3 to the current value.
The issue is that the expression is re-evaluated based on current value for every new character typed into the field. You'd expect typing "+=333" to increase the value by 333, but instead it increases by 369 (+=3, +=33, +=333) unless you paste the full expression in one go.
Steps:
1. Create any object at 0,0,0 position.
2. Type (not paste!) "+=333" into say position x field.
Results: position is 369 (i.e. 3+33+333).
Expected: position is 333.
A proper way would be to store the initial values, and evaluate expressions against the value when the user stared to edit the field, instead of current value.
-
CyRaid
Oct 29, 2021 13:10
I'm not sure what += does but I know if you wanna add a quick +333 just add a +333 to the value.
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 (fix version 2022.2):
Fixed in 2022.2.0a11