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
- Mono Windows Builds don't produce full log callstacks when generating logs
- AssetBundles fail to load when running in Built Players for Mobile Devices
- UI elements with text gets bigger and grey when Player window is moved to another screen with different resolution
- System name accepts multiline text but crops it on confirmation, duplicates input, and shrinks the field when empty
- UI element scale and position are wrong in project build when DRS is changed with HDR and Software Dynamic Resolution enabled
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.