• 1402/05/31

تبلیغات ادیوری :

سلام من طبق مستندات ادیوری این اسکریپت رو برای بازی طراحی کردم ولی تبلیغات نمایش داده نمی شه

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using AdiveryUnity;

public class AdiveryInterstitial : MonoBehaviour
{
   AdiveryListener listener;
   string app_id = "db79b06e-2d8f-4b93-b030-d6eec6060ab3";
   string rewarded_id = "aca66886-a1fa-490d-8d06-a1e932764cae";

   public void Awake()
   {
       listener = new AdiveryListener();
       Adivery.PrepareInterstitialAd(rewarded_id);
       Adivery.AddListener(listener);

       listener.OnError += OnError;
       listener.OnInterstitialAdLoaded += OnInterstitialAdLoaded;
       Adivery.Configure(app_id);
   }

   public void Ads()
   {
       if(Adivery.IsLoaded(rewarded_id))
       {
           Adivery.Show(rewarded_id);
       }
   }

   public void OnInterstitialAdLoaded(object caller , string placementid)
   {

   }
   public void OnError(object caller , AdiveryError error)
   {
       Debug.Log("placement ; " + error.PlacementId + " error ; " + error.Reason);
   }
}