Multiple VideoAd Requests

Hello All!

I’m developing a game for iOS and Android and i have integrated Unity Ads
There are a few unclear things about Unity Ads that i hoped i can get the answers from the forum.

  • I’m using Unity 2018.3.0f2, should i use the built in ads? or the Monetization SDK? what’s the difference? (also i cant find the banner ads in the built in version)

  • is it okay to request multiple ad placements at a time before actually needing to show the ad? i have an example use case for this, when the game starts, i request two ad placements, video and rewardedVideo, if the player scores above half the best score and dies, they’re shown a rewardedVideo (it’s ready because its been requested before hand), and a video otherwise (ready because its ready before hand)

using System;
using System.Collections;
using UnityEngine;
using UnityEngine.Advertisements;

public class VideoAds : MonoBehaviour
{
#if UNITY_ANDROID || UNITY_IOS || UNITY_EDITOR
    private const string SkippablePlacementID = "video";
    private const string RewardedPlacementID = "rewardedVideo";
    public string PlacementID => AdType == VideoAdType.Skippable ? SkippablePlacementID : RewardedPlacementID;
    public bool IsReady { get; private set; }

    public event Action<VideoAdType> OnAdReady;
    public event Action<ShowResult> OnAdFinished;

    public VideoAdType AdType;

    private void Start() => MakeReady();

    public void Show()
    {
        if (Advertisement.IsReady(PlacementID))
        {
            var options = new ShowOptions { resultCallback = OnAdFinished };
            Advertisement.Show(PlacementID, options);
        }
        else
            OnAdFinished(ShowResult.Failed);

        IsReady = false;
    }
    public void MakeReady()
    {
        StartCoroutine(Ready());
    }

    IEnumerator Ready()
    {
        while (!Advertisement.IsReady(PlacementID))
        {
            yield return new WaitForSeconds(1f);
        }
        IsReady = true;
        OnAdReady?.Invoke(AdType);
    }
#endif
}

@shkar-noori

The latest version of the Ads SDK is 3.0.0 and it is currently only available on the Asset Store. You will have to disable the built-in version of Unity Ads (from the Package Manager and the Service Window). SDK 3.0 is currently the only way to access the Banner API (in Advertisement.Banner).
https://assetstore.unity.com/packages/add-ons/services/unity-monetization-3-0-66123

We don’t currently have an API to request a video. Requests happen automatically during initialization and once an ad starts playing, the next one is requested. So that’s not a step you have to worry about.

The Ads SDK will request the ad assets to fill as many placements as possible. We do not need to distinguish between a rewarded and non-rewarded placement at the request. The overlay is typically the only thing that changes between a rewarded video and a non-rewarded video.

1 Like

thanks for the reply!