Admob interstitial ads
I imported admob plugin to my android game and it worked fine, after i removed the test ad device and added my unit id interstitial to the code and tested it on my tablet (i tested the real ad only one time because i know that if i see too many ads in development i might get banned from admob) and it worked great, but the only problem is that when i checked my admob account it said that i still have 0 impressions. and it should show me that i got 1 impression.
Download Admob Unity3d Plugin https://github.com/unity-plugins/Unity-Admob
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. $$anonymous$$ake 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");
Integrate Interstitial into Unity 3d app
Here is the $$anonymous$$imal code to create an interstitial.
Admob.Instance().loadInterstitial();
Interstitials need to be explicitly shown. At an appropriate stopping point in your app, check that the interstitail is ready before showing it:
if (Admob.Instance().isInterstitialReady()) {
Admob.Instance().showInterstitial();
}
Hope it helps you
Answer by abdoubelbala · May 12, 2017 at 06:26 PM
you have just to wait 24 hours, it happend to me a lot of times.
Answer by unityplayer1989 · Jul 15, 2017 at 03:40 AM
Download Admob Unity3d Plugin https://github.com/unity-plugins/Unity-Admob
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");
Integrate Interstitial into Unity 3d app
Here is the minimal code to create an interstitial.
Admob.Instance().loadInterstitial();
Interstitials need to be explicitly shown. At an appropriate stopping point in your app, check that the interstitail is ready before showing it:
if (Admob.Instance().isInterstitialReady()) {
Admob.Instance().showInterstitial();
}
Hope it helps you