Home > Software engineering >  UI background changes with the aspect ratio
UI background changes with the aspect ratio

Time:10-01

I am making a 3D game on Unity. Currently I work on main menu. The problem is when I use 16:9 aspect ratio I get this result: expected and correct result

The background is not scaled.

However when I use Free aspect ratio, I get this: not expected result Here is background object properties and sprite properties:

enter image description hereenter image description here

I have no clue what is the problem here and how to solve it. I hope to find some help here. Thanks in advance.

CodePudding user response:

You should extract one tile of the background sprite like this: enter image description here

Then it should be tiled correctly. The key is to extract the smallest repeatable element.

Also, you don't have to worry about the Free Aspect. Just make sure it looks fine on the real screen resolutions.

  • Related