Hi everyone. I have two problems with my project. First when I press my “watch ads and make money” button it shows ads but after first ad it automatically starts second, but I am not touching the screen. Is there no way to stop this?
My second problem is that I want to learn if a player watched and finished ad or not,but I use only Advertisement.Show() function. Therefore I have no information about the runtime processes. I looked this answer: c# - resultCallback for Unity Ads to only reward if video finished - Stack Overflow but I could not understand what the pause and adString variables mean.(pause is probably about another part of program but what is the adString?)
Thanks for your time…
Please post the code you use to show the ad.
Thanks,
Rasmus
Thanks for reply.
I have found this code in code samples and it works.
using UnityEngine;
using UnityEngine.Advertisements;
public class UnityAdsExample : MonoBehaviour
{
public void ShowRewardedAd()
{
if (Advertisement.IsReady("rewardedVideoZone"))
{
var options = new ShowOptions { resultCallback = HandleShowResult };
Advertisement.Show("rewardedVideoZone", 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;
}
}
}
However, I want to show mini ads near edges but I could not find this option. Ads always are shown in full screen mode. Is there any option to do that?
Thanks…
Nope, Unity Ads only supports full screen videos. You must use another ad network for banner ads.