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
- Redoing creation of Sub Scenes and Cube GameObjects in Hierarchy throws “Assertion failed on expression: 'targetScene != nullptr’” error in Console window
- Selecting “New Sub Scene” after assigning “New Scene” in Sub Scene Script Component throws “Destroying GameObjects immediately is not permitted” in the Console window
- Shader Graph "Zoom Step Size" can be set to 0 even though the zoom still works
- Enabling/Disabling the Deprecated Nodes doesn't apply to the opened Shader Graph unless any Variable is added to the Blackboard
- Group Selection title text size is smaller in renaming than the actual font size
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.