Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

288
Views
Unity Admob banner suddenly becomes bigger with video on its bottom

recently I have decided to ad google admob banners to the game. I have followed every step by the guide and added our ad-unit-id too. So everything is ok and cool, but suddenly the banner becomes larger and is showing video at about thrice (or even bigger) the size of the banner itself.

I'm using unity 2020.1.13 and I have tested different banner sizes as admob guide suggesting (SmartBanner, AdaptiveBanner, (default small) Banner ,... ) everything. but it keeps punching me in the face each time. The following images are the normal size(which I expect it to remain) and the larger version that happens 2-3 times out of 10.

Normal size After loaded video size
Normal Size (expected to remain like this) Bigger size wit video

The code requesting the banner is:

    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);
}

in the code u are seeing adaptivesize and constantSize , I tested both and came up with the same result, also I tested smart banner and same result too.

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Until now I could not find any solution for this, even after contacting admob support they refused to answer me.

So for you guys using admob banner ads, seems like you mustn't use video banner

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!