T
T
Tikhon Vorushilo2021-03-27 17:59:15
Unity
Tikhon Vorushilo, 2021-03-27 17:59:15

How to fix sprite scaling in Unity?

How to render sprites for different screens? With the button, I understand. There are anchors. How about a sprite? In the project, the picture is of normal size, and after assembly on Android, it goes beyond the screen.
And the buttons themselves on different screens are sometimes closer to oval, sometimes small.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
pashara, 2021-03-27
@pashara

It's not about sprites.
For the UI (if it is a standard unit one), the CanvasScaler component is hung up, which properly scales the UI.
For ingame, the main camera is resized. It is decided what is more important for the game - to align in height or in width. Initially - the alignment goes along the height. How to make width alignment for perspective and orthographic cameras - you can look here https://www.youtube.com/watch?v=0cmxFjP375Y

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question