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
- Crash on GizmoDrawingPhysics2D::DrawCompositeCollider2DGizmo when opening a Scene that has corrupted GameObjects with Tilemap Components
- Scrolling vertically and horizontally is very fast when in Play Mode and RuntimeInputBackend is set to UIToolkitInputBackendOption.Default
- Crash on MemoryProfiler::UnregisterAllocation when initializing entities and leaving Play Mode with Occlusion Culling enabled
- Crash on mdb_page_alloc when opening a project that was running while the PC shut down
- macOS Player freeze when using RunInBackground and Command+Tabbing to and from the application
Resolution Note (fix version 2022.2):
Fixed in 2022.2.0a11