Reputation: 305
I want to create a 2D game with unity. I use anchor points and canvas scaler as everybody says in the Internet.
The image below shows how do I set anchors
However, when I create an apk for Android. It works for some mobile devices (I tested with Xiaomi, Samsung with 720p,1080p or higher resolutions) but it doesn't work well for tablets. Such as Samsung Galaxy Tab A 10.1. In the image below: left one is Xiaomi, right one is Galaxy Tab
In the internet everyone says it can be done using anchors and canvas scaler and they resize the Game screen and show the UI scales in Unity. Yes, it happens so in unity. But it doesn't happen so in devices. In the image below I wanted to show when I resize the Game screen in unity there is no problem about scaling. What can I do about that? I appreciate for any help in advance.
Upvotes: 1
Views: 1247
Reputation: 199
Change the match value to 0.5 -> 1 what in canvas scaler component and reset or modify UI.
Upvotes: 0
Reputation: 64
The thing is, you can expand your UI 100% correctly only by 1 dimension - width or height. Looks like your UI suppose to preserve vertical size and can handle some free space on left and right, so change in Canvas Scaler component "Match" to Height (=1), so it will change your UI only if height is changing.
Upvotes: 1