Hy guys.
I Just wanted to ask a question about screen resolution.
I am making a game for android. Is there any way to make my game for all mobiles. Briefly describing I just wanted to ask that my game’s background and its component like textbox, button etc also change their place w.r.t screen but show at that same point as I adjust them on editor. Is there any free plugin or any code for this problem? Now I am using a method.
- I change my canvas to screen space overlay.
- Then change my Scale mode to screen size
- Further info is shown in Image
1 Answer
1
Unity Manual - Designing MultiResolution
It’s not easy to support many different devices. The bigger the variation in aspect ratios, the more difficult it becomes, but I would start with the Canvas Scaler set to your target platform resolution (say iPad 2048 x 1536) and match to 0.5f so it matches width and height equally. In combination with anchoring and layout groups, you can build a pretty flexible UI that works across multiple screen sizes.
The difficult part is actually, that at some point, you might not want your UI to scale proportionally with resolution. For example, consider a desktop app on a giant monitor and the same app on a mobile phone. You wouldn’t want buttons to take up the same amount of screen space, instead you want the tiny screen to display a completely different layout with much bigger buttons etc. In that case you’d probably have to introduce some coded logic to the scaling, but as long as you stay within one magnitude of screen sizes, like only mobile or only desktop, you’re fine using the builtin tools.
well tahnks. I'll try this.
– Muhammad_Taha