Hi there, I am planning to make my first mobile game using Unity. The only thing i am confused about is that how does the aspect ratio work? i mean, how do i get to fit my font and the whole correctly on all screen sizes? Is there a setting change, code etc…?
Thanks in advance.
Screen sizes varies depending on the device so you need to look it up for every device. Generally I add all the screen’s pixel dimensions to the Game tab to make sure it looks good on every device.
For text or other GUI elements you could use a Canvas and change the “UI Scale Mode” setting under “Canvas Scaler” to “Scale With Screen Size”.
This will change the size of Canvas objects to fit the device that it is running on. Generally you still need to do quite a bit of testing to make sure it looks good overall though.