- Home /
Answer by Deathfate · Feb 15, 2017 at 05:29 PM
If you want to preserve the original aspect of the sprite then tick the Preserve aspect
in your Image.
If you want to crop the Image then Make a parent object with a RectMask2D
then put your Image as a child of that object, add to your Image object an AspectRatioFitter
and tweak it as you like.
Answer by Ishidres · Jan 18 at 02:26 PM
If you want to add an image to your canvas which:
- acts as a background,
- maintains its aspect ratio,
- and automatically scales to fit the game view's width and height,
add new object with an Image
component and with an Aspect Ratio Fitter
component. Add the image to the source image
, select Envelope Parent
in the Aspect Mode
and make it stretch horizontally and vertically in the Rect Transform
component.
Answer by hangarter · Feb 15, 2017 at 04:03 PM
Alter the size in the Transform -> Size section. Also be careful with the gizmo you choose: the one with the three colour squares can resize aspect ratio if you drag the center square (yeah a fourth square). The gizmo that puts blue spheres around the selection only crops everything.
I'm sorry, I can't find the section you are talking about. Is it on the image component?
I'm referring to the Transform component, top right of the unity UI. :-)