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
- Fixing Message Loss in UMPE During Domain Reload
- The Editor freezes when ScheduleReadOnly of IJobParallelForTransform with dependency is used
- Text is truncated in the Inspector when the display scale is set to 150%
- CancellationTokenSource(<timeout>) has incorrect cancellation status when used in WebGL Player
- VFX property value names are cut off when properties with 'Arc' are viewed in the VFX Blackboard
Resolution Note (fix version 2022.2):
Fixed in 2022.2.0a11