Search Issue Tracker
By Design
Votes
0
Found in
2022.3.62f1
6000.0.49f1
6000.1.3f1
6000.2.0b1
Issue ID
UUM-105343
Regression
No
"GetPreferedValue" returns max value when using auto-sizing
Reproduction steps:
1. Open the attached “IN-100421” project
2. Open the “Scenes/SampleScene” Scene
3. Enter the Play Mode
4. Select the “Text (TMP)” GameObject in the Hierarchy window
5. Make sure “Auto Size” option is checked under “TextMeshPro - Text” component
6. Press the “Test PrefferedValue” button under “Test Text Mesh” component
7. Observe the “Rect” GameObject’s size
Expected result: “Rect” GameObject’s size is set to text’s preferred value
Actual result: “Rect” GameObject’s size is set to text’s auto sizing max value
Reproducible with: 3.0.9, 3.2.0-pre.12 (2022.3.62f1), 6000.0.49f1, 6000.1.3f1, 6000.1.0b1
Couldn’t test with: 4.0.0-pre.2 (2022.3.62f1) - Compilation errors
Reproducible on: Windows 10
Not reproducible on: No other environment tested
Note:
- “GetRenderedValues” function returns proper size values
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
- [Android] Audio sound is lower in the Player compared to the native music player
- Feet slide and misalign when playing retargeted animations
- IndexOutOfRangeException is thrown in NativePassCompiler when a graphics buffer is used in more than 5 render passes
- "Undo Stack Overflow" error is thrown, and Undo History is deleted when multiselected GameObjects are reparented to their GrandParents
- SearchColumn of type "ObjectReference" does not get refreshed for the custom SearchProvider when lighting generation finishes
Resolution Note:
This is more of a philosophical question than a bug. When Auto‑Size is on and the text has no layout constraints, we return the maximum font size you set, because that’s the largest size Auto‑Size can choose. If you need GetPreferredSize to use the exact font size you specified, Auto-Size could be disabled.