Unity Ads not showing in editor (dummy ad placement is not showing too) as well as in the build.

So this is not first time I’ve used Unity Ads, I’ve turned on ADS from Services window. Made an AdsManager class which looks like this:

public class AdsManager : MonoBehaviour
{
public delegate void OnVideoAdFinishListener();
public static event OnVideoAdFinishListener onVideoAdFinishListener;

public void VideoAdFinishListener()
{
	if (onVideoAdFinishListener != null)
		onVideoAdFinishListener ();
}

public void ShowRewardedAd()
{
	print ("Showing Ad");
	if (Advertisement.IsReady ("rewardedVideo")) {
		var options = new ShowOptions { resultCallback = HandleShowResult };
		Advertisement.Show ("rewardedVideo", options);
	} 
	else 
	{
		Debug.Log ("Ad Not ready");
	}
}

private void HandleShowResult(ShowResult result)
{
	switch (result) {
	case ShowResult.Finished:
		Debug.Log ("The ad was successfully shown.");
		VideoAdFinishListener ();
		break;
	case ShowResult.Skipped:
		Debug.Log ("The ad was skipped before reaching the end.");
		break;
	case ShowResult.Failed:
		Debug.LogError ("The ad failed to be shown.");
		break;
	}
}

Plain and simple. Everything is in place. I have a decent internet connection as well.

But even in editor, it tells me “Ad not ready”, which is supposed to be the blue colored dummy Ad.

There’s no ad on the build as well. I don’t know what’s going on here. This is the first time I’ve faced such a problem. Can anyone help me here?

Thank you!

Can you include some debugging? I’m guessing it doesn’t get initialized by some reason.
Include something like:

public void ShowRewardedAd() {
    Debug.Log(string.Format("Platform is {0}supported

Unity Ads {1}initialized",
Advertisement.isSupported ? “” : "not ", Advertisement.isInitialized ? “” : "not "));

    if (Advertisement.IsReady ("rewardedVideo")) {
        var options = new ShowOptions { resultCallback = HandleShowResult };
        Advertisement.Show ("rewardedVideo", options);
    } 
    else {
        Debug.Log ("Ad Not ready");
    }
}

Okay. I fixed this after hours of fiddling.

First:
Do everything you were told to-do in the code samples.

Second:
Import the following →
using UnityEngine.Advertisements;
using UnityEditor.Advertisements;
using UnityEngine.Purchasing;

Third (And probably the step you missed):
Go to the unity ads services. (command.control - 0)
Go advanced.
Assign your game Id in unity services ad tab.