Answer the question
In order to leave comments, you need to log in
How to correctly size?
I have several prefabs that are made of 150x150 pixel images, I set the camera to this value - Portrait 9:16.
Then, through the cycle, I brought out the prefabs with a grid of 10 by 17, since they were larger than the cells, I reduced their size to 0.7, it looked normal in the test. Then I compiled it on the phone, the conclusion is as follows - the prefabs are stretched by 10-15% in height, and they also don’t fit everything on the screen, they don’t fit about half the prefab on the left and right, when testing, on the contrary, there was free space on the sides of the prefab floor. .. The
questions are as follows:
1. How to get the same result in the test and on the phone?
2. How do I make and arrange prefabs so that they are relatively the same size on any phone?
Answer the question
In order to leave comments, you need to log in
We need to set Canvas'u Render Mode - Screen Space Camera and drag our camera to the desired field, and in the canvas scaler component set the scale mode to "scale with screen size".
The engine itself will proportionally scale your interface on all devices.
PS. The first paragraph is purely for convenience.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question