UI Image stretched in Unity

Hi all,

I’m not sure I’m allowed to post this kind of request here, so feel free to delete it.

I’m currently having an annoying issue with Unity 5.5 and 5.6. I have a UI Image that exceeds the screen (that’s ok, it’s what I want) but that seems to stretch the image. As you can see that happens only when running the game. Any idea about the reasons?
The stretched image is on the first image (the red planet on the right side). The same image is used for the second screen (much smaller and not stretched).

Screenshot 1 (red planet stretched on right side):

Screenshot 2 (same image used here but not stretched):

Screenshot 3 (Unity scene, image is not stretched):

Thanks in advance for any help!
Diego

1 Like

Hello Diego, how are you?
The best place to post issued related to unity is on the unity lobby.

Regarding this problem, you will have to check the preserve aspect box in the image that is stretched. If this option is unckecked it will stretch the images to the bonds of the rect, if you check it, it will use the biggest possible size that fits in the rect without changing the aspect ratio

1 Like

Hey Joao, thank you for your response! The preserve aspect box was actually checeked but I found what was causing the issue… I was applying a rotation on the Y axis! So the image wasn’t actually stretched, it was rotated on the wrong axis!

Thank you, I’ll post there next time :slight_smile:

1 Like

Glad to know that you got it fixed, congrats :slight_smile:

Privacy & Terms