2D Mobile: How to support unusual aspect ratios?
I'm testing my 2d mobile game on a LG G6 which has an aspect ratio of 18:9. As I am fairly new to Unity I don't know how to achieve a scaled UI to support 18:9 as well as 16:9? I use a Canvas Scaler with the "Scale with Screen Size" option and I also tried different aspect ratios modes in the Android player settings before building. But I still got the black borders at the top and the bottom (in portrait mode). Is there a simple way to fix this or what is the best way to achieve the goal? Do I need to change something of the camera?
Answer by Phil109 · May 01, 2018 at 11:16 AM
Okay seems like Unity isn't adding
<meta-data android:name="android.max_aspect" android:value="2.1" />
to the manifest, only android:maxAspectRatio which isn't enough. As soon as I added this meta data manually and build the app, it works. I will create a bug report for this.
Your answer
Follow this Question
Related Questions
Problem with Samsung Galaxy Note 8 1 Answer
Camera Doesn't Show Game In Build 0 Answers
How to use External camera on andorid 0 Answers
Force top black bar on Android devices 1 Answer
Get Android camera snapshots without freezing preview 0 Answers