I’m attempting to add the interstitial ads to my mobile game but not even let me go through the fist steps in the editor. when I click the button it doesn’t work or I get the message of the console: “Interstitial ad not ready at the moment! Please try again later!”
This is my script I’m using:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Advertisements;
public class AdsController : MonoBehaviour
{
#if UNITY_IOS
private string gameId = “xxxxxx”;
private string placementId = “Interstitial_iOS”;
#elif UNITY_ANDROID
private string gameId = “xxxxxx”;
private string placementId = “Interstitial_Android”;
#endif
private bool testMode = true;
void Start()
{
Advertisement.Initialize(gameId, testMode);
}
public void ShowInterstitialAd()
{
if (Advertisement.IsReady(placementId))
{
Advertisement.Show(placementId);
}
else
{
Debug.Log(“Interstitial ad not ready at the moment! Please try again later!”);
}
}
}
But When I erased the “placementId” of the Advertisement.IsReady and Advertisement.Show save it, click the button it show the unity screen ads example. Should I erased the project in unity dashboard and create a new one.
I’m stuck in this for 3 days, heeelp!!