Answer the question
In order to leave comments, you need to log in
Why doesn't the banner in Unity Ads work?
Here is a script snippet:
using UnityEngine.Monetization;
public static int lose = 0;
if (Monetization.isSupported)
{
Monetization.Initialize(gameId, false);
}
if (lose == 5 & Monetization.IsReady("rewardedVideo"))
{
ShowAdCallbacks options = new ShowAdCallbacks();
options.finishCallback = rewardedVideoHandleShowResult;
ShowAdPlacementContent rewardVideoAd = Monetization.GetPlacementContent("rewardedVideo") as ShowAdPlacementContent;
rewardVideoAd.Show(options);
}
if (Monetization.IsReady("banner"))
{
ShowAdCallbacks bannerOptions = new ShowAdCallbacks();
ShowAdPlacementContent bannerAd = Monetization.GetPlacementContent("banner") as ShowAdPlacementContent;
bannerAd.Show(bannerOptions);
}
Answer the question
In order to leave comments, you need to log in
What does Monetization.IsReady("banner") return?
maybe you just turned it on and the servers haven't added anything to your ad yet. sometimes it happens that only after the first N users or requests is inflated.
If everything is set up and other ads from the unit show ads, just try to wait 24 hours or look in the log in more detail on the device (suddenly swears or writes the reason).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question