I have a Ad Display script that will show a ad that you cant skip. It is set up so that the ad will be shown if a button is pressed but i doesn’t seem to be working
using UnityEngine;
using UnityEngine.Advertisements;
using System.Collections;
public class Ad_Display : MonoBehaviour {
[SerializeField] string gameID = "1177323";
void Awake ()
{
Advertisement.Initialize(gameID, true);
}
public void ShowAdd()
{
if (Advertisement.IsReady("rewardedVideoZone"))
{
ShowOptions options = new ShowOptions();
options.resultCallback = HandleShowResult;
Advertisement.Show("rewardedVideoZone", options);
Debug.Log("Add has been Showen");
}
}
private void HandleShowResult(ShowResult result)
{
switch (result)
{
case ShowResult.Finished:
Debug.Log("The ad was successfully shown.");
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;
}
}
}
Any help will be greatly appreciated.