Search Issue Tracker
By Design
Votes
0
Found in [Package]
4.0.0-pre.2
Issue ID
TMPB-215
Regression
No
[TextMeshPro] Spaces after a text are not shown if using “Content Size Fitter”
How to reproduce:
1. Open the attached “text.zip” project
2. Open “New Scene” Scene
3. In the Hierarchy, expand “Canvas” and “Money (TMP)” GameObjects
4. Select the “MoneyText (TMP)” GameObject
5. In the Inspector window, add spaces after the “Money:” text
6. Observe the text in the Game window
Expected result: Spaces are shown between “:” and “100” text
Actual result: Spaces aren’t shown between “:” and “100” text
Reproducible with: 3.0.6 (2021.3.3f1), 4.0.0-pre.2 (2022.3.11f1, 2023.1.17f1, 2023.2.0b14, 2023.3.0a10)
Reproduced on: macOS 13.5.2 (Intel)
Not reproducible on: No other environment tested
Notes:
- UGUI 3.0.0-exp.3 was used for 2023.2.0b14, 2023.3.0a10
- not reproducible with legacy Text
- not reproducible if adding text after the spaces
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
- Mono Windows Builds don't produce full log callstacks when generating logs
- AssetBundles fail to load when running in Built Players for Mobile Devices
- UI elements with text gets bigger and grey when Player window is moved to another screen with different resolution
- System name accepts multiline text but crops it on confirmation, duplicates input, and shrinks the field when empty
- UI element scale and position are wrong in project build when DRS is changed with HDR and Software Dynamic Resolution enabled
Resolution Note:
By default, white spaces are not considered for the layout when at the end of the text. Changing the Text Wrapping Mode to "Preserve Whitespace" will ensure they are preserved.