Unity UI icon stretched? Check Preserve Aspect and layout bounds
Use a square icon and two tall slots to separate the visible sprite, layout rectangle and click area in Unity uGUI.


A perfectly round skill icon can become oval in a tall inventory slot. Test the Simple Image component in Unity uGUI before changing the art. This fixture targets a single Canvas icon. Nine-sliced borders use different controls.
Run a two-slot test
- Draw a circle that nearly fills a square sprite and add thin crosshairs. Assign it to two
Imagecomponents under the same Canvas. Give both a 100-by-160RectTransform, with identical anchors, centered pivots and unit scale. - Turn on
Preserve Aspectfor the second icon only. With the layout held fixed, the first circle looks taller than it is wide. The second occupies about 100 by 100 units and leaves roughly 30 above and below. The Inspector should still show 100 by 160 for both layout rectangles. - With a Graphic Raycaster present, enable
Raycast Targeton the aspect-preserved Image and leavealphaHitTestMinimumThresholdat its default of zero. Try the empty bands. They can still intercept clicks under rectangle-based hit testing. For a button that owns the whole rectangle, put the raycast on the button background and disable it on the decorative icon.
Retest the sprites you ship
Use Sprite Sheet Packer to organize the icon artwork, then repeat the check on the Sprite imported by Unity. If the centered icon still looks offset, inspect uneven transparent padding and confirm the layout group leaves the intended rectangle in place.
Recommended tools

Sprite Sheet Splitter Guide: Extract Animation Frames for 2D Games
Learn how a sprite sheet splitter extracts clean animation frames from character sheets, VFX sheets, tiles, UI sprites, and AI-generated game assets.

Best Sprite Sheet Packer Settings for Indie Game Assets
A practical SEO-friendly guide to sprite sheet packer settings, including atlas size, padding, trimming, extrude, rotation, metadata, and recommended export settings for 2D game assets.

Smart Sprite Sheet Packer: A Practical Guide for 2D Game Developers
Learn how a smart sprite sheet packer helps indie game developers combine PNG assets into clean texture atlases with metadata for Unity, Cocos, Godot, and custom 2D game engines.
Ready to try "Unity UI icon stretched? Check Preserve Aspect and layout bounds"?
Use our online tools to apply this tutorial to your indie game project right away.
