Unity3d 团结:我不';未收到AdMob横幅或插页
当我用Unity构建应用程序时,一切都很好。 我收到的信息如下: 虚拟载荷 但是当我在我的设备上发布我的内置版本时,我没有收到任何广告。 我在Play Store上发布了我的应用程序,并在几个设备上进行了测试,但没有结果 我的unity版本是2018.3.3f1。并且代码在AdMob函数中被阻止 这是我的代码:Unity3d 团结:我不';未收到AdMob横幅或插页,unity3d,Unity3d,当我用Unity构建应用程序时,一切都很好。 我收到的信息如下: 虚拟载荷 但是当我在我的设备上发布我的内置版本时,我没有收到任何广告。 我在Play Store上发布了我的应用程序,并在几个设备上进行了测试,但没有结果 我的unity版本是2018.3.3f1。并且代码在AdMob函数中被阻止 这是我的代码: //request a banner public void RequestBanner() { // These ad units are configured to al
//request a banner
public void RequestBanner()
{
// These ad units are configured to always serve test ads.
#if UNITY_EDITOR
string adUnitId = "unused";
#elif UNITY_ANDROID
string adUnitId = "ca-app-pub-2202385704427937/3307508552";
#elif UNITY_IPHONE
string adUnitId = "ca-app-pub-3940256099942544/2934735716";
#else
string adUnitId = "unexpected_platform";
#endif
// Clean up banner ad before creating a new one.
if (this.bannerView != null)
{
this.bannerView.Destroy();
}
// Create a 320x50 banner at the top of the screen.
this.bannerView = new BannerView(adUnitId, AdSize.SmartBanner,
AdPosition.Top);
// Register for ad events.
this.bannerView.OnAdLoaded += this.HandleAdLoaded;
this.bannerView.OnAdFailedToLoad += this.HandleAdFailedToLoad;
this.bannerView.OnAdOpening += this.HandleAdOpened;
this.bannerView.OnAdClosed += this.HandleAdClosed;
this.bannerView.OnAdLeavingApplication +=
this.HandleAdLeftApplication;
// Load a banner ad.
this.bannerView.LoadAd(this.CreateAdRequest());
}
//request a interstitial video
public void RequestInterstitial()
{
// These ad units are configured to always serve test ads.
#if UNITY_EDITOR
string adUnitId = "unused";
#elif UNITY_ANDROID
string adUnitId = "ca-app-pub-2202385704427937/1308031170";
#elif UNITY_IPHONE
string adUnitId = "ca-app-pub-3940256099942544/4411468910";
#else
string adUnitId = "unexpected_platform";
#endif
// Clean up interstitial ad before creating a new one.
if (this.interstitial != null)
{
this.interstitial.Destroy();
}
// Create an interstitial.
this.interstitial = new InterstitialAd(adUnitId);
// Register for ad events.
this.interstitial.OnAdLoaded += this.HandleInterstitialLoaded;
this.interstitial.OnAdFailedToLoad +=
this.HandleInterstitialFailedToLoad;
this.interstitial.OnAdOpening += this.HandleInterstitialOpened;
this.interstitial.OnAdClosed += this.HandleInterstitialClosed;
this.interstitial.OnAdLeavingApplication +=
this.HandleInterstitialLeftApplication;
// Load an interstitial ad.
this.interstitial.LoadAd(this.CreateAdRequest());
}
//to show video
public void ShowInterstitial()
{
if (this.interstitial.IsLoaded())
{
this.interstitial.Show();
}
else
{
MonoBehaviour.print("Interstitial is not ready yet");
}
}
不幸的是,我没有50分可以在你的作品上发表评论。可能,但是,如果你的测试广告一切正常,那么你可能忘记了添加直播广告的付款细节。不幸的是,我没有50分可以在你的作品上发表评论。可能,但是嘿,如果您的测试广告一切正常,那么您可能忘记添加直播广告的付款细节。我解决了我的问题。 我将这些行添加到android清单中
<meta-data
android:name="com.Company.laytonMiniGames"
android:value="ca-app-pub-
2202385704427937~1064488595"/>
我解决了我的问题。
我将这些行添加到android清单中
<meta-data
android:name="com.Company.laytonMiniGames"
android:value="ca-app-pub-
2202385704427937~1064488595"/>
当我尝试一个较旧的admob插件测试时,广告效果良好,但实际广告号。现在我尝试一个2018插件,我既没有收到测试,也没有收到实际广告。当我尝试一个较旧的admob插件测试时,广告效果良好,但实际广告号。现在我尝试一个2018插件,既没有收到测试,也没有收到实际广告