Ads are no more working ?? asset store version & service version dont work anymore?

hi
I dont now what happend with unity ads .
I want to update a game from me but now the ads are no more works also empty project dont works and this dont work on 5.50f3 and 5.3.6f1 nothing working?
Have someone a solution ?

Here is my code for my ads

code

using UnityEngine;
using UnityEngine.Advertisements;

public class UnityAdsInitializer : MonoBehaviour
{
    [SerializeField]
    private string
        androidGameId = "",
        iosGameId = "";

    [SerializeField]
    private bool testMode;

    void Start()
    {
        string gameId = null;

#if UNITY_ANDROID
        gameId = androidGameId;
#elif UNITY_IOS
        gameId = iosGameId;
#endif

        if (Advertisement.isSupported && !Advertisement.isInitialized)
        {
            Advertisement.Initialize(gameId, testMode);
        }
    }
}
using UnityEngine;
using System.Collections;
using UnityEngine.Advertisements;
public class test : MonoBehaviour {

    // Use this for initialization
    void Start () {
        Advertisement.Show();
    }
   
    // Update is called once per frame
    void Update () {
        Advertisement.Show();
    }
}

Ads are working, just verified here on Android+iOS and checked our server monitoring for last few days. In your case:

  • Have you changed build target to either Android or iOS in Unity?
  • Would recommend that you don’t call Advertisement.Show in Start() as Ads most likely hasn’t even been downloaded at that point, and in Update() you should call Advertisement.IsReady() before trying to show an ad (but probably above code is just example to see if it works at all…)

/Rasmus

1 Like

hi
thx for your anwser thats works but its very delay when i example click a button for a reward or normal ad it need 5-10sec for showing the ads?
Do you now how i made it that first the ads playing before the other scene will loading or like the reward ?

Correct, the Ads SDK needs to download and cache the video before IsReady() will return true. After all it’s a matter of downloading content to a device, and yes that takes some time after all :slight_smile:
(streaming videos is typically not reliable)

/Rasmus