Search Issue Tracker
Won't Fix
Votes
2
Found in
5.3.5p2
Issue ID
805987
Regression
No
[UI] Image with Horizontal Layout Group does not look at the scale of child object and doesn't scale right
Steps to reproduce:
1. Open attached project "UIScale.zip"
2. Open "scene" scene
3. Select "Canvas/Container/Border/Text" in Hierarchy
4. Try to change the scale of Text
5. Notice how border doesn't scale with Text and draws border as if the text scale was 1 ("UI.gif" attached)
Expected behavior: border scales with Text.text no matter what scale Text is
Reproduced with: 5.3.0f4, 5.3.5f1, 5.4.0b21
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
enchiridion
Feb 02, 2017 14:56
This is a problem especially with Bitmap fonts, which do not use Font Size, but scale instead. However if you scale the Bitmap font, like @jasonmcintosh says, the LayoutGroups will use the text at scale (1,1,1) which causes empty space around the text.
jasonMcintosh
Nov 04, 2016 23:02
Something similar happens with images/sprites in a HorizontalLayoutGroup.
Size in the layout will use the source texture dimensions, not the dimensions of the image in the layout group. If you scale the image down, the width will remain the same, which creates empty space around the image.
Unity 5.3.6p4.