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
- Debugger stops at commented lines of code when using ECS
- Asset preview doesn't update on changing shader's _GlobalColor property when the shader uses global uniforms
- Crash on GetSpriteAtlasDependenciesFromBinary when opening specific project
- Animation Clip with Legacy enabled does not play when Time.timeScale is set to 0 despite Update mode set to "Unscaled time"
- Rename is enabled on subfolder empty space - "Can't rename to empty name" warning
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.