unity3d - Unity Admob 横幅突然变大,底部有视频

标签 unity3d admob banner banner-ads

最近我决定在游戏中添加 google admob 横幅广告。我已按照指南进行了每一步操作,并添加了我们的广告单元 ID。所以一切都很好,很酷,但突然间横幅变大了,并且显示的视频大小约为横幅本身的三倍(甚至更大)。

我使用的是 unity 2020.1.13,我已经测试了不同的横幅尺寸作为 admob 指南建议(SmartBanner、AdaptiveBanner、(默认小)横幅、...)一切。但它每次都不停地打我的脸。以下图片是正常尺寸(我希望它保持不变)和较大版本,每 10 次出现 2-3 次。

<表类="s-表"> <头> 正常尺寸 加载后的视频大小 <正文> Normal Size (expected to remain like this) Bigger size wit video

请求横幅的代码是:

    public void RequestBanner(string unitID)
{
    

    // Clean up banner ad before creating a new one.
    if (this.bannerViewAd != null)
    {
        Debug.Log("|||| Prev Banner removed!");
        this.bannerViewAd.Destroy();
    }
    
    AdSize adaptiveSize =
        AdSize.GetPortraitAnchoredAdaptiveBannerAdSizeWithWidth(AdSize.FullWidth);
    
    
    // Create a 320x50 banner at the top of the screen.
    this.bannerViewAd = new BannerView(unitID, adaptiveSize, AdPosition.Bottom);
    
    // Called when an ad request has successfully loaded.
    this.bannerViewAd.OnAdLoaded += this.HandleOnAdLoaded;
    // Called when an ad request failed to load.
    this.bannerViewAd.OnAdFailedToLoad += this.HandleOnAdFailedToLoad;
    // Called when an ad is clicked.
    this.bannerViewAd.OnAdOpening += this.HandleOnAdOpened;
    // Called when the user returned from the app after an ad click.
    this.bannerViewAd.OnAdClosed += this.HandleOnAdClosed;
    // Called when the ad click caused the user to leave the application.
    this.bannerViewAd.OnAdLeavingApplication += this.HandleOnAdLeavingApplication;
    
    // Create an empty ad request.
    AdRequest adRequest = new AdRequest.Builder().Build();
    
    // Load the banner with the request.
    this.bannerViewAd.LoadAd(adRequest);
}

在代码中你看到了 adaptivesize 和 constantSize ,我测试了两者并得到了相同的结果,我也测试了智能横幅和相同的结果。

最佳答案

直到现在我都找不到任何解决方案,即使联系了 admob 支持他们也拒绝回答我。

所以对于你们这些使用 admob 横幅广告的人来说,似乎你们不能使用视频横幅广告

关于unity3d - Unity Admob 横幅突然变大,底部有视频,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65747858/

相关文章:

c# - 弹丸未正确继承父级速度 (Unity3D)

c# - Unity3d 和线程

c# - Unity C# JsonUtility 没有序列化列表

android - 如何将 AdMob 广告集成到适用于 Android 和 iOS 的 Cordova 项目中?

CSS定位和滚动

css - 转义 div 容器的边界

c# - 将 Texture2D 转换为 OpenCV Mat?

java - 实现 AdMob 后出现问题

android - 如何修复因资格问题而被 google play 商店拒绝的 Android 应用程序?

javascript - 如何使用 JS 根据图像制作动态横幅更改背景颜色?