Search Issue Tracker
By Design
Votes
0
Found in
2017.4.0f1
2018.3.0a5
2018.3.11f1
2019.1.0a1
2019.2.0a1
Issue ID
1143009
Regression
No
RectTransform Width, Height values are changed when adding 'TMP-Text(UI)' component and 'TMP Essential Resources' are imported
How to reproduce:
1. Create a new project
2. Import 'TMP Essential Resources' by going to top menu -> 'Window' -> 'TextMeshPro' -> 'Import TMP Essential Resources' and press 'Import' button
3. Create a 'Canvas' Game Object. Right-click in the Hierarchy 'UI' -> 'Canvas'
4. Add an empty game object to Canvas. Right-click on 'Canvas' -> 'Create Empty'
5. Add 'TextMeshPro - Text (UI)' component to the empty 'GameObject' in the Inspector tab
Expected result: No changes in Rect Transform
Actual result: Width and Height parameters are changed
Reproducible: 2017.4.25f1, 2018.3.12f1, 2019.1.0f1, 2019.2.0a11
Can't reproduce: 2018.3.0a1, 2018.3.0a2, 2018.3.0a4 because missing of UI creation
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
- Articulation Body with 'Revolute' Joint Type has erratic behavior when Upper Limit is set to above 360
- WebGL Player fails to render Scene when Terrain with Detail Mesh is added and WebGPU Graphics API is used
- Inconsistent errors are logged when different types are passed into the Query "Q<>" method in UIToolkit and the ancestor VisualElement is null
- Crash on GetMaterialPropertyByIndex when opening a specific Scene
- Discrepancies in the styling are present when using a TSS file instead of a USS file in custom EditorWindow
Resolution Note:
This behavior is by design in the sense that the default size of the text container (RectTransform) is defined in the TMP Settings. As such, when adding a Text component, it will lookup those defined default sizes and adjust the RectTransform accordingly.
If the RectTransform is defined with a size other than 100 x 100 which is their default size, the Text Component will override that size by the TMP Settings default settings. If the RectTransform is created and changed to some other size, then adding the Text component will not override that size.