using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Advertisements;
public class NewBehaviourScript : MonoBehaviour {
public void ShowRewardedAd()
{
if (Advertisement.IsReady(“rewardedVideo”))
{
var options = new ShowOptions { resultCallback = HandleShowResult };
Advertisement.Show(“rewardedVideo”, options);
}
}
private void HandleShowResult(ShowResult result)
{
switch (result)
{
case ShowResult.Finished:
Debug.Log(“The ad was successfully shown.”);
//
// YOUR CODE TO REWARD THE GAMER
// Give coins etc.
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;
}
}
}
Did you check device log? Sorry, we cannot help you without a device log, and in any case when developing for Android, it’s often useful to be able to use device log for investigating various issues.
Sounds like same issue, i.e. that you see the placeholder ad in Unity editor, but doesn’t show on Android?
Still the answer for getting device log is “adb logcat -v time UnityAds:V *:S” from command line. I checked that the command works here on Windows and Mac. Please see if you get any error message when trying to call that command on your machine.
Well, ideally you should take a look yourself in the device log to see if it contains any relevant information. If you cannot, you are welcome to share the device log here (as text file, not screenshot)