- Home /
What is the size of Unity Banner Ad?
Unity currently supports two sizes for Banner Ads - 320 X 50 or 720 X 90 pixels (according to Implementing Banner ads ).
Here are my questions:
which size should I expect (and prepare for)? is it device dependent?
how to determine current size at runtime?
Based on experiments in Test mode.
In Editor:
dummy banner "This would be your banner" of size 320 x 50 (doesn't depend on current resolution)
Android (720 x 1280):
dummy banner "unity Ads" of size 680 x 95 (approximately)
Answer by PlanarBit · Sep 09, 2019 at 08:15 AM
Still no additional info in documentation.
So we don't know what banner size to expect or how find it out at runtime.
Then there is only one way to go - always expect the highest banner (90 px). And there will be a vacant space on screen when smaller banner is shown. Obviously, the smaller screen resolution the bigger issue this will be.
Answer by Ahmet-Hayrullahoglu · Oct 27, 2019 at 04:39 PM
This is what I use in my games for 50 pixel banner height:
bannerHeight = Camera.main.ScreenToWorldPoint(new Vector3(1, 50 * Screen.dpi / 160, 1)).y - Camera.main.ScreenToWorldPoint(new Vector3(1, 0, 1)).y;
Answer by pablo_leban · Jan 27, 2020 at 02:57 AM
I ended up using Google AdMob because I was unable to get the height of the banner.
did they work?? Because for me not... in the editor, they work fine but in mobile not. When i try to request an ad not a banner, the application closes. In the debug says id didn't find class GoogleMobileAds... same and for banner ads but the application doesn't stop.
Your answer
![](https://koobas.hobune.stream/wayback/20220612200518im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
is there an advantage of creating multiple Ad units/ Placement of same type in Unity, Admob etc? 1 Answer
Banner ad works in unity but doesn't work in android phone 1 Answer
UnityAds banner not showing properly (half of banner cut of by bottom of screen) 0 Answers
Google banner Ads display problem 0 Answers
Banner Ad Without Button 0 Answers