Google AdMob banner ads
Hi, I just would like to make a simple banner ad on my bottom of screen on couple scene. I registered on Google AdMob i have my id number. But after this I'm lost i tried couple tutorial from youtube but they won't work. Anybody can help or link a tutorial what works with a newest unity 5.6
Answer by unityplayer1989 · Jul 15, 2017 at 03:43 AM
Installation Admob Unity
Open your project in the Unity editor. Navigate to Assets -> Import Package -> Custom Package. Select the AdmobUnityPlugin.unitypackage file. Import all of the files for the plugins by selecting Import. Make sure to check for any conflicts with files.
Init Admob Unity Plugin
Create A C# script ,drag the script to a object on scene , add the follow code in the script file
using admob;
Admob.Instance().initAdmob("admob banner id", "admob interstitial id");//admob id with format ca-app-pub-279xxxxxxxx/xxxxxxxx
//Admob.Instance().initAdmob("ca-app-pub-3940256099942544/2934735716", "ca-app-pub-3940256099942544/4411468910");
Add Admob Banner in Unity App
Here is the minimal code needed to show admob banner.
Admob.Instance().showBannerRelative(AdSize.Banner, AdPosition.BOTTOM_CENTER, 0);
The AdPosition class specifies where to place the banner. AdSize specifies witch size banner to show
Remove Banner
By default, banners are visible. To temporarily hide a banner, call:
Admob.Instance().removeBanner();
Admob Unity3d Plugin https://github.com/unity-plugins/Unity-Admob
Hope this can help you
Your answer
![](https://koobas.hobune.stream/wayback/20220612122729im_/https://answers.unity.com/themes/thub/images/avi.jpg)