Search code examples
androidunity-game-engine2d-games

Unity android resolution


So, I've just begun to develop in Unity for Android (2d game). I already did some search on the net, but I didn't found anything.

How can I set up an Unity UI, to be addictive to the Android Multiple screes resolutions ? When I test in Unity it works fine, but when I install on different phones, the characters are disappearing, the whole UI just blow up

Any idea ?


Solution

  • You can use Canvas Scalar. The Canvas Scaler component is used for controlling the overall scale and pixel density of UI elements in the Canvas. This scaling affects everything under the Canvas, including font sizes and image borders.

    enter image description here

    • You would set the UI Scale mode to Scale With Screen Size.
    • Once you do that, you will see the Reference Resolution X and Y field. The X is the width and Y is the height of the Screen you are designing the game for.
    • Set the Screen Match Mode to Match Width or Height so as to scale it dynamically.
    • Set the Match factor to 1 or whatever.