Ejemplo n.º 1
0
 private void RequestAd()
 {
     cbInfo.text = "request ad";
             #if UNITY_IOS
     PlayableAdsBridge.LoadAd(gameObject.name, "iOSDemoApp", "iOSDemoAdUnit");
             #endif
 }
    private void RequestAd()
    {
        cbInfo.text = "request ad";
                #if UNITY_IOS
        PlayableAdsBridge.LoadAd(gameObject.name, iosTestAppId, iosTestAdUnitId);
                #endif

        PlayableAdsAdapter.RequestAd(androidTestAdUnitId);
    }
Ejemplo n.º 3
0
    private void RequestInterstitial()
    {
        cbInfo.text = "ZPLAYAds interstitial is loading...";

                #if UNITY_IOS
        PlayableAdsBridge.RequestAd(iOSTestInterstitial);
                #endif

                #if UNITY_ANDROID
        PlayableAdsAdapter.RequestAd(androidTestInterstitial);
                #endif
    }
Ejemplo n.º 4
0
    private void RequestAd()
    {
        cbInfo.text = "ZPLAYAds ad is loading...";

                #if UNITY_IOS
        PlayableAdsBridge.RequestAd(iOSDemoAdUnitId);
                #endif

                #if UNITY_ANDROID
        PlayableAdsAdapter.RequestAd(androidDemoAdUnitId);
                #endif
    }
Ejemplo n.º 5
0
 private void PresentAd()
 {
     cbInfo.text = "present ad";
             #if UNITY_IOS
     if (PlayableAdsBridge.IsReady())
     {
         PlayableAdsBridge.PresentAd();
     }
     else
     {
         cbInfo.text = "ad not ready.";
     }
             #endif
 }
Ejemplo n.º 6
0
    void Start()
    {
        requestBtn.onClick.AddListener(RequestAd);
        presentBtn.onClick.AddListener(PresentAd);

        requestInterstitialBtn.onClick.AddListener(RequestInterstitial);
        presentInterstitialBtn.onClick.AddListener(PresentInterstitial);

                #if UNITY_IOS
        PlayableAdsBridge.Init(gameObject.name, iOSDemoAppId);
        PlayableAdsBridge.ChannelId("channel_id");
                #endif

                #if UNITY_ANDROID
        PlayableAdsAdapter.Init(gameObject.name, androidDemoAppId);
        PlayableAdsAdapter.ChannelId("channel_id");
                #endif
    }
    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.";
        }
    }
Ejemplo n.º 8
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
    }
Ejemplo n.º 9
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
    }