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
- UI Overlay Image gets darker on each Camera when multiple Cameras are used
- Assertion failed on expression: 'scriptedImporterClass == SCRIPTING_NULL error when opening the standalone profiler window
- Disabled assets in Import Unity Package window aren't tracked but count as being selected by user
- [Windows] Crash on GetManagerFromContext when video is playing and creating High Definition 3D Projects after FMOD failed to switch back to normal output Error appeared
- GC Alloc produced when adding items to MultiColumnListView with Auto Assign Binding
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.