View on Asset Store (opens in new tab)
Package details
- Latest version
- 1.0
- Last updated
- First released
- Unity version
- 2019.4.21 or later
- Package size
- 2.1 MB
- Files
- 9
- Favorites
- 5
- Views in the past week
- 2
Price tracking
- Last checked
- Tracked since
- Lowest recorded
- $5.00 on
AspectImage
Price $5.00
Buy on Asset Store (opens in new tab)
Affiliate link · Purchases support this site
Price history
Last 6 months
USDAsset preview
1 / 1
AspectImage video 1
About this asset
AspectImage is an Image class that inherits from the Image class for Canvas and can set the aspect ratio.
The following three types can be specified with AspectImage.
1. Scale To Fill
Sprite is stretched to the same size as RectTransform and displayed. The aspect ratio will not be maintained.
2. Aspect Fit
Maintains the aspect ratio and draws with the maximum size that does not go out of the drawing range of RectTransform.
3. Aspect Fill
Maintains the aspect ratio and draws the image with the minimum size within the RectTransform's drawing range.
Since it inherits from Image, it also works with Mask, Shadow, Material, and other functions available in Image.
It can be generated in the same way as the regular Image class by right-clicking in the Hierarchy and selecting "UI > AspectImage".
The following three types can be specified with AspectImage.
1. Scale To Fill
Sprite is stretched to the same size as RectTransform and displayed. The aspect ratio will not be maintained.
2. Aspect Fit
Maintains the aspect ratio and draws with the maximum size that does not go out of the drawing range of RectTransform.
3. Aspect Fill
Maintains the aspect ratio and draws the image with the minimum size within the RectTransform's drawing range.
Since it inherits from Image, it also works with Mask, Shadow, Material, and other functions available in Image.
It can be generated in the same way as the regular Image class by right-clicking in the Hierarchy and selecting "UI > AspectImage".
From the publisher's Asset Store listing.
Compatibility
| Unity version | Built-in | URP | HDRP | Custom |
|---|---|---|---|---|
| 2019.4.21f1 | Compatible | Compatible | Compatible | Compatible |
As listed on the Asset Store.