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
- Crash on memcpy when using ScreenCapture.CaptureScreenshot with superSize set to zero
- [URP] Package Samples - Missing scripts in Unity 2022+
- [URP][Package Samples] Continuous "Renderer at index _ is missing for camera _" warnings when opening sample scene
- [URP] Package Samples - Missing scripts in Unity 6
- [URP] Package samples - scenes using FirstPersonController not working in Unity 6
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.