Home > Enterprise >  Responsive in Unity 2D
Responsive in Unity 2D

Time:10-25

I want my Unity 2d game responsive in all android mobile device. So i anchor 4 canvas to 4 edge (top left, top right, bottom left, bottom right). enter image description here But when i change a device, the size of each component is not change. Now i want the size of each component change depend on each resolution of device. What should i do or what tutorial i can follow.

Problem will come when i get small screensize, it like this enter image description here

CodePudding user response:

Canvas Scaler

You can solve it using Canvas Scaler. You can find various options in the list in UI Scale Mode. When selecting the option to fit the commonly used screen size, If you want to align UI elements to the height, set Match, an element of Screen Math Mode, to Height, and if you want both height and width to match, place it in the center.

  • Related