ADMobs插页式广告未在设备上展示

时间:2015-10-14 03:28:00

标签: unity3d ads banner interstitial

你们过去一直很有帮助,所以希望我们可以把它弄清楚......

我正在使用unity3d进行游戏开发和ADMobs横幅广告似乎工作正常,但插页式广告不会显示。在统一控制台中,它表示广告已加载,甚至说它显示但在设备上没有任何反应......

这是我附在画布上的脚本。

   using UnityEngine;
    using System.Collections;
    using GoogleMobileAds.Api;
    using ChartboostSDK;

public class StartUpADS : MonoBehaviour {

    void Awake(){
        RequestInterstitial ();

    }

    private void RequestInterstitial()
    {
        #if UNITY_ANDROID
        string adUnitId = "ca-app-pub-xxxxxxxxxxxxxxxxxxxxxxxxxxx";
        #elif UNITY_IPHONE
        string adUnitId = "INSERT_IOS_INTERSTITIAL_AD_UNIT_ID_HERE";
        #else
        string adUnitId = "unexpected_platform";
        #endif

        // Initialize an InterstitialAd.
        InterstitialAd interstitial = new InterstitialAd(adUnitId);
        // Create an empty ad request.
        AdRequest request = new AdRequest.Builder().Build();
        // Load the interstitial with the request.
        interstitial.LoadAd(request);

        if (interstitial.IsLoaded()) {
            interstitial.Show();
        }
    }
}

0 个答案:

没有答案