private void PresentAd()
    {
        cbInfo.text = "present ad";
                #if UNITY_IOS
        if (PlayableAdsBridge.IsReady())
        {
            PlayableAdsBridge.PresentAd();
        }
        else
        {
            cbInfo.text = "ad not ready.";
        }
                #endif

        if (PlayableAdsAdapter.IsReady(androidTestAdUnitId))
        {
            PlayableAdsAdapter.PresentAd(androidTestAdUnitId);
        }
        else
        {
            cbInfo.text = "ad not ready.";
        }
    }
示例#2
0
    private void PresentInterstitial()
    {
                #if UNITY_IOS
        if (PlayableAdsBridge.IsReady(iOSTestInterstitial))
        {
            PlayableAdsBridge.PresentAd(iOSTestInterstitial);
        }
        else
        {
            cbInfo.text = "ad not ready.";
        }
                #endif

                #if UNITY_ANDROID
        if (PlayableAdsAdapter.IsReady(androidTestInterstitial))
        {
            PlayableAdsAdapter.PresentAd(androidTestInterstitial);
        }
        else
        {
            cbInfo.text = "ad not ready.";
        }
                #endif
    }
示例#3
0
    private void PresentAd()
    {
                #if UNITY_IOS
        if (PlayableAdsBridge.IsReady(iOSDemoAdUnitId))
        {
            PlayableAdsBridge.PresentAd(iOSDemoAdUnitId);
        }
        else
        {
            cbInfo.text = "ad not ready.";
        }
                #endif

                #if UNITY_ANDROID
        if (PlayableAdsAdapter.IsReady(androidDemoAdUnitId))
        {
            PlayableAdsAdapter.PresentAd(androidDemoAdUnitId);
        }
        else
        {
            cbInfo.text = "ad not ready.";
        }
                #endif
    }