- Home /
Android phone screen ratio confusion.
I am new to developing android apps with Unity and something thats bugged me is how to get the app to fit the screen of all android devices. In the game window, I saw the different aspect ratios but i wasnt sure which one to choose. How do i get my app to fit the screens of all android devices from API level 14 to the latest..
Answer by SterlingSoftworks · May 25, 2015 at 03:52 PM
For portrait I use an aspect ratio of 9:15. Looks good on everything I've seen my app on. From the new 6 Edge, a 7in tablet to the GS5, and my HTC one M8 (though it's windows, still fine). Don't use Resolution.
Also, if you want to see what your app/project looks like on your phone (extremely helpful and wish I knew this sooner...) go into your phone's settings and find "developer tools" or something similar and check USB Debugging. Now go into Unity -> File -> Build Settings. In the pop-up window, add your current scene (right mid of pop-up window), choose Android from the platform window, "switch platform" in the bottom left of the pop-up window, plug your phone into your computer and hit Build and Run. Don't let your phone lock while it's building or else the build will fail (don't worry it's not gonna explode). Now your App should start playing on it's own and you'll be able to see what it looks like. :) (it's also downloaded on the phone now so you can unplug it and still play it without any worries)
Hope that helps!
Answer by alok-kr-029 · May 25, 2015 at 06:03 AM
what kind of game is it . If you are talking about placment of the UI element I would suggest you to use Rect transform and anchore the element. if you are making 2d game then you can take an empty game objects add rect transform make it the child of the canvas and anchore them to all the possible location and make the gameobject the child of it based on the anchoring ... hope I am clear...
Your answer
![](https://koobas.hobune.stream/wayback/20220613200234im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Making objects be at size and place for every phone size 2 Answers
Unity 5 UI Fill Any Screen 2 Answers
Script for resize aspect ratio for every device (andorid 2D) ?? 0 Answers
AutoScale Screen with Perspective Camera 0 Answers
Android: Get black bars when screen ratio is higher than 16:9 0 Answers