Search Issue Tracker
Fixed
Fixed in 3.2.x
Votes
1
Found in [Package]
3.2.x
Issue ID
TMPB-198
Regression
Yes
[TMP] [UGUI] Incorrectly calculating rect size when using <size> tag
Reproduction steps:
1. Open the attached project "TMP bug"
2. Open the “/Assets/Scenes/SampleScene.unity” Scene
3. Observe the Game View
Expected result: Text is shown inside the Canvas as seen in NoRepro.jpg
Actual result: TMP text showing outside of Canvas as seen in the Repro.jpg
Reproducible with: TMP 3.2.0-pre.1 (2021.3.26f1), TMP 3.2.0-pre.4 (2020.3.48f1, 2021.3.26f1, 2022.2.21f1, 2023.1.0b18)
Not reproducible with: TMP 3.0.6 (2021.3.26f1), UGUI 2.0.0 (2023.2.0a16)
Could not test with: TMP 4.0.0-pre.2 (2022.2.21f1, 2023.1.0b18), UGUI 3.0.0-exp.1 (2023.2.0a16) (NullReferenceException: Object reference not set to an instance of an object)
Reproducible on: Windows 10 Enterprise 21H2
Note:
- Forum post featuring this issue [https://forum.unity.com/threads/tmp-3-2-0-pre-4-incorrectly-calculating-line-height-when-using-size-tag.1427199/|https://forum.unity.com/threads/tmp-3-2-0-pre-4-incorrectly-calculating-line-height-when-using-size-tag.1427199/]
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
- Opening Terrain Prefab in Prefab Editing Mode throws "NullReferenceException" error
- [Search] Dragging query pills put them behind the search text field
- A CustomPropertyDrawer that returns a PropertyField for a property named the same as a child field will not render all child fields
- Graphics Settings shows default values instead of the real values in the Rendering Debugger when Volume.profile is assigned via script
- Deleting multiple Tags throws “NullReferenceException”, and "Retrieving array element that was out of bounds" errors when holding the Enter key
Resolution Note:
Fixed by another internal issue: TMPB-165: [TextMeshPro] Truncate mode cuts off text when using Content Size Fitter
Resolution Note (fix version 3.2.x):
Ensure PreferredHeight handles various line heights correctly.
Sorry for the confusion, the ticket was mistakenly closed as won't fix instead of resolved. The issue will be fixed in com.unity.textmeshpro@3.2.0-pre.5.