Search Issue Tracker
Fixed in 5.2.0
Votes
3
Found in
5.0.0p3
Issue ID
685842
Regression
No
UnityEngine.UI.Text trims trailing spaces
How to reproduce:
1. Open a new project
2. Create a UI Text
- Make sure the Horizontal Overflow is set to 'Overflow'
3. Input "A " into the text
- Note how the A is not shifted to the left
4. Add another non-space symbol at the end
- Note how the A now shifts to the left, taking into account all of 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
- Only the left screen is rendering when using Render Graph Fullscreen Blit in Meta Quest 2
- Context menu with the "Revert" option doesn't appear when pressing the right mouse button on a "Vector2" or "Vector3" property in the Inspector of a custom shader
- Missing Render Feature "Full Screen Pass Render Feature" in any “Universal Renderer Data” asset when upgrading from 2022.3
- Inconsistent ParticleSystemVertexStream.PercentageAlongTrail data range in Trail Texture Modes except "Stretch"
- The Graph Debug Window can be right clicked through and the Node Workspace is manipulated instead
steven williams
Jun 16, 2015 16:00
Adding a trailing space should be a quick fix for right-aligned button text touching the button's border. It has no effect.
MAZE_INC
Apr 03, 2015 22:13
This issue involves ContentSizeFitter component too! This component should resize both the width and the height of an element based on the Text content. If you insert a string with final spaces those aren't taken into account when calculating the width.