Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to integrate admob interstitial in Unity?

I am looking to integrate admob interstitial in Unity, i did it for banner but unable to find final solution for interstitial, any help would be appreciated.

I tied following links but it didn't work for Interstitial https://github.com/googleads/googleads-mobile-plugins

Please do not suggest any paid plugin as Prime31 etc.

like image 935
stack Avatar asked Jun 25 '14 07:06

stack


People also ask

How do I integrate AdMob in Unity?

Set your AdMob app ID In the Unity editor, select Assets > Google Mobile Ads > Settings from the menu. Enable AdMob by clicking Enabled checkbox under Google AdMob section. Then enter your Android and iOS AdMob app ID in each field.

Can I use Unity ads and AdMob together?

Unity Technologies Hey, unfortunately right now it isn't possible to use AdMob with Unity Ads enabled and the standard Unity Ads SDK in a project at the same time. The reason is that the AdMob SDK with the Unity Ads adapter included actually already contains a copy of the Unity Ads SDK.


2 Answers

You can download the unity package from the google developer page here

like image 147
trenki Avatar answered Dec 02 '22 11:12

trenki


If the free plugin doesn't suit your needs, you'll have to write your own native plugin or purchase on on the Asset Store. However, that plugin's README says it supports interstitials. Try following the instructions in the readme. If you already tried that and it didn't work, it would help if you tell us exactly what went wrong.

Taken from that readme:

Here is the minimal banner code to create an interstitial.

using GoogleMobileAds.Api;
...
// Initialize an InterstitialAd.
InterstitialAd interstitial = new InterstitialAd("MY_AD_UNIT_ID");
// Create an empty ad request.
AdRequest request = new AdRequest.Builder().Build();
// Load the interstitial with the request.
interstitial.LoadAd(request);

Unlike banners, interstitials need to be explicitly shown. At an appropriate stopping point in your app, check that the interstitail is ready before showing it:

if (interstitial.IsLoaded()) {
  interstitial.Show();
}
like image 23
sargunv Avatar answered Dec 02 '22 11:12

sargunv