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). 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
CodePudding user response:
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.