A
A
Alexander Andropov2019-03-12 12:23:18
Unity
Alexander Andropov, 2019-03-12 12:23:18

How to make Canvas (panel) for different resolutions?

Good day friends.
Tell me how to correctly set the Anchor Presets so that the Panel (Canvas) component is the same for all resolutions.
I'm making a project for mobile devices with Landscape orientation, creating a Canvas at a resolution of 2960x1440, setting Canvas - Render Mode: Screen Space - Camera in the parameters, adding Main Camera.
I add a Panel, I want this panel to be tied to the top of the screen, 1/8 of the screen in size (as in classic games, the panel is on top with all sorts of points, hp lives, etc.), at a resolution of 2960x1440 it’s fine, but for example, if select 800x480, this panel becomes on the floor of the screen (it also stretches down).
How to properly configure these UI elements so that the panel decreases or increases along with the resolution change depending on this very resolution?
Thank you very much in advance!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
GavriKos, 2019-03-12
@LongOf

You need to start by setting up CanvasScaler.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question