On apk build I cant see any ads

Hello I enabled test mode and opened Force Test mode on dashboard also set my phone as test device. When I try it on editor the ad place holder pops up. But when I build it for my android device nothing happens I can’t see any ads.

using UnityEngine;
using UnityEngine.Advertisements;

public class GameManager : MonoBehaviour , IUnityAdsInitializationListener , IUnityAdsShowListener
{
    [SerializeField] GameObject gameOverScreen;

    void Awake()
    {
        Advertisement.Initialize("4923691", true, false, this);

        gameOverScreen.SetActive(false);
        Time.timeScale = 0;
    }
    
    public void OnBombHit()
    {
        if (Advertisement.IsReady())
        {
            Advertisement.Show("Interstitial_Android", this);
            Time.timeScale = 0;
            gameOverScreen.SetActive(true);
        }
        else {}
    }

    public void OnInitializationComplete()
    {
        Debug.Log("Init Success");
    }

    public void OnInitializationFailed(UnityAdsInitializationError error, string message)
    {
        Debug.Log("FAILED");
    }

    public void OnUnityAdsShowFailure(string placementId, UnityAdsShowError error, string message)
    {
        Debug.Log("");
    }

    public void OnUnityAdsShowStart(string placementId){}

    public void OnUnityAdsShowClick(string placementId) {}

    public void OnUnityAdsShowComplete(string placementId, UnityAdsShowCompletionState showCompletionState){}
}

I made a fruit ninja clone and OnBomb hit game stops and ad pops up. And as I said in editor it works but in apk build nothing happens.

I get “Init success” output on console and Advertisement.IsRead() is true on editor but false on phone.

Hi @ODABASI,

I’ve just noticed that you haven’t got any answer yet. In which course and lecture are you?

Privacy & Terms