Search Issue Tracker
Fixed
Fixed in 2022.3.63f1, 6000.0.51f1, 6000.1.6f1, 6000.2.0b4, 6000.3.0a1
Votes
1
Found in
2022.3.61f1
6000.0.46f1
6000.1.0b14
6000.2.0a8
6000.3.0a1
7000.0.0a1
Issue ID
UUM-102690
Regression
No
Rect Transform values are set to NaN when scaling UI element with centered scaling
How to reproduce:
1. Create and open a new project
2. Create a Button, right click in the Hierarchy and go to UI > Button - TextMeshPro
3. In the Inspector, Rect Transform component, change Pivot X and Y values to 1
4. Select “Rect Tool” from the Tools overlay, in the Scene view
5. Make sure pivot mode in the Tool Settings is set to Pivot
6. Click and hold one of the Button's corners
7. Press and hold Alt key
8. Drag the Button’s corner
9. Observe the Scene view, the Inspector and the Console
Expected results: Button is resized, values in the Rect Transform component change accordingly, no errors in the Console
Actual results: Button disappears, values in the Rect Transform component are changed to NaN, error is thrown in the Console
Reproducible with: 2022.1.0a1, 2022.3.61f1, 6000.0.46f1, 6000.1.0b14, 6000.2.0a8
Reproducible on: Windows 11
Not reproducible on: No other environments tested
Notes:
- To reproduce the issue any one (or both) of the Pivot’s X or Y values has to be 0 or 1
- Some corners do not reproduce the issue, depends on the Pivot X and Y values combination
- Some properties are also set to NaN in the Rect Transform component for all children of the UI element
- Undo only reverts changes in the UI element’s Rect Transform component, does not revert changes in children
Comments (2)
-
Syrian_Survivor
May 20, 2025 08:36
Workaround: set RectTransform pivots as 0.5, 0.5 for X and Y
-
Syrian_Survivor
May 20, 2025 08:27
Can confirm:
- reproducible on Windows 10
- reproducible on Unity Version 6000.0.23f1
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
- “Label” name in Sprite Library Editor window lacks character limit causing long names go under the Object Field
- Preview image (screenshot) is not available after capturing snapshot in Memory Profiler
- Crash on UNITY_FT_Stream_ReadAt when changing TMPro properties after unloading an AssetBundle
- Particles spawn at the same position when using raw byte address buffer in VFX Graph
- Decal Shader Graph - Custom vertex interpolators are always 0
Resolution Note:
Postponed port
Resolution Note (fix version 6000.3.0a1):
Rect Transform values are set to NaN when scaling UI element with centered scaling
Resolution Note (fix version 6000.0.51f1):
Rect Transform values are set to NaN when scaling UI element with centered scaling