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
- Search field in UI Builder's Library has no character limit
- Changing the value in UI Builder by dragging increases it by a few thousand points when reaching the borders of the screen
- ARM64 architecture DLL incorrectly copied instead of x64 when building for Windows x64
- Crash on TypeTreeIterator::GetNode when opening a specific folder
- Crash on WriteSerializedAssetsV2 when (re)entering the Play Mode in a specific project when IEnumerator Start() is used
Resolution Note (fix version 2022.2):
Fixed in 2022.2.0a11