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
- [URP][XR] Spotlight shadows flicker when Deffered Rendering Path is selected and rotating the HDM view in XR
- Scene view audio toggle doesn't work after disabling and enabling audio source component with audio random container
- Pitch changes while paused messes up scheduling of the audio random container
- Fixed Joint anchors to the origin instead of the current position of the GameObject when the Fixed Joint is added in Play Mode via script
- Crash on detail::ComputeShaderSnippetKey when entering the Play mode
Resolution Note (fix version 2022.2):
Fixed in 2022.2.0a11