Unity Ads question

Hi,
Me and some friends are in the process of making an android game, which we plan to get onto the Google Play store. Therefor we wanted to implement Unity Ads. We need both the simple (Interstitial ads) and the reward ad (videos). We followed the code samples for both and are fairly sure that this is correct. However when they are displayed they are both displayed as video ads, but is this only because we are in test mode, or did we do something wrong. This is tested on a OnePlus 2 and a OnePlus 3.

1: reward ad implementation (Admanager). The showad method is called in an other class.

public class AdManager : MonoBehaviour
{
    [SerializeField]
    string gameID = "1295866";

    void Awake()
    {
        Advertisement.Initialize(gameID, true);
    }

    public void ShowAd(string zone = "")
    {
#if UNITY_EDITOR
        StartCoroutine(WaitForAd());
#endif

        if (string.Equals(zone, ""))
            zone = null;

        ShowOptions options = new ShowOptions();
        options.resultCallback = AdCallbackhandler;

        if (Advertisement.IsReady(zone))
            Advertisement.Show(zone, options);
    }

    void AdCallbackhandler(ShowResult result)
    {
        switch (result)
        {
            case ShowResult.Finished:
                // Hardcoded reward, change later when we get more reward ads
                GameManager.Instance.Player.GetComponent<CharController>().Revived = true;
                GameManager.Instance.Player.GetComponent<CharController>().Halo.SetActive(true);
                GameManager.Instance.Player.GetComponent<CharController>().Halo.GetComponent<SpriteRenderer>().sprite = Resources.Load("Invincible", typeof(Sprite)) as Sprite;
                Debug.Log("Ad Finished. Rewarding player...");
                break;
            case ShowResult.Skipped:
                GameManager.Instance.Player.GetComponent<CharController>().PlayerDeath();
                Debug.Log("Ad skipped. Son, I am dissapointed in you");
                break;
            case ShowResult.Failed:
                GameManager.Instance.Player.GetComponent<CharController>().PlayerDeath();
                Debug.Log("I swear this has never happened to me before");
                break;
        }
        Time.timeScale = 1;
    }

    IEnumerator WaitForAd()
    {
        float currentTimeScale = Time.timeScale;
        Time.timeScale = 0f;
        yield return null;

        while (Advertisement.isShowing)
            yield return null;

        Time.timeScale = currentTimeScale;
    }

2: simple ad implementation. The adtimer is to delay the showing of the ad, since this code is in the start method of a script on a object in another scene.

if (GameManager.Instance.AdTimer <= 0)
        {
            if (Advertisement.IsReady())
            {
                Advertisement.Show();
                GameManager.Instance.AdTimer = 300;
            }
        }

Hope you can help.

Regards,
Jonas

Unity ads, if you’re talking about the two options they offer, I believe are both video ads. The ones they offer by default either allow skipping or don’t. In test mode, it should just display something simple from unity on a mobile device.

You may also have better luck on the ads part of the forum if you haven’t tried that section already Unity Services - Unity Discussions

Thank you for the answer. Though it says right here, that simple ads is Interstitial ads: https://docs.unity3d.com/Manual/UnityAdsHowTo.html (Step 2: Add code to your game).

I totally missed that section, and will try that right away!