P
P
Pavel2018-09-12 13:15:46
Unity
Pavel, 2018-09-12 13:15:46

How is SpriteRenderer scalability achieved?

Everything is clear with Image and Canvas, but scalable SR is a mystery to me. What is he for then?
We have a prefab on which the SpriteRenderer hangs and we Instantiate it at runtime.
Let's say I was building a game for android with a resolution of 480x800.
The game was downloaded and installed by a user with a resolution of 800x1280.
And after Instantiate, everything moved out for him.
I saw a way in which the camera scales to the screen resolution, but it seems like changing the scales is not the best practice...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Daniil Basmanov, 2018-09-12
@youkerni

And you don’t need to scale the SpriteRenderer, you have a camera for this, frustrum and change it. Choose a base resolution, layout everything for it, and change Camera.orthographicSize for other resolutions .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question