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
Comments (2)
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
- “Remove Unused Overrides” available on not loaded Scene and throws “ArgumentException: The scene is not loaded” warning
- Adaptive Probe Volume occlusion edge is calculated incorrectly when viewing probes near geometry edges
- Sampling a texture using an HLSL file throws shader errors and the code does not compile
- "Graphics.CopyTexture called with null source texture" error when Base Camera of an Overlay Camera is removed with DX11 Graphics API and Compatibility Mode enabled
- WebGL sends wrong value with large numbers when SendMessage function is used
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.