Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

Admob : Getting Ad Load Error Detail

Discussion in 'Android' started by artanist, Feb 20, 2021.

  1. artanist

    artanist

    Joined:
    Oct 28, 2014
    Posts:
    61
    Hello, I'm trying to implement AdMob inside of Unity, but I keep getting an error 3 which mean there is NEVER an ad to get. Now, after research, there could be multiple reasons for this (not just that there is no ad to be serve at that point in time), but I fail to get detail of that error.

    I looked at this page to know how to get those detail:
    https://developers.google.com/admob/unity/ad-load-errors

    The code start as follow:
    Code (CSharp):
    1. public void OnAdFailedToLoad(object sender, AdFailedToLoadEventArgs args)
    2. {
    3.     LoadAdError loadAdError = args.LoadAdError;
    4.     ....
    5. }
    Unfortunatly, the LoadAdError object doesn't exist. I import the library, I made sure to import the latest version of AdMob in my project and check if the version of the SDK is good. I really don't know how I can get that detail version of the error to work.

    I implemented the event in my code as follow :

    Code (CSharp):
    1. public void RequestInterstitial()
    2. {
    3.    this.interstitial = new InterstitialAd(adUnitId);
    4.   this.interstitial.OnAdFailedToLoad += HandleOnAdFailedToLoad;
    5.  
    6. }
    7.  
    8. ...
    9.  
    10. public void HandleOnAdFailedToLoad(object sender, AdFailedToLoadEventArgs args)
    11.     {
    12.  
    13.         Debug.Log("Add Fail to Load : " + args.Message);
    14.     }
    When I check args, only the string Message is available. There is no LoadAdError in it and that type of object is not recognize by visual studio.

    The only thing I can think of is that I don't use the right library. Here is the link I use to get the plugin:
    https://github.com/googleads/googleads-mobile-unity/releases/tag/v5.4.0

    Is there another place you can get the AdMob package ?
     
  2. TheAcidoswaldo

    TheAcidoswaldo

    Joined:
    Sep 24, 2020
    Posts:
    1
    hey! I have the same problem, any luck with this?
     
  3. The_Mean_Fiddler

    The_Mean_Fiddler

    Joined:
    Nov 27, 2014
    Posts:
    17
    Last edited: Apr 21, 2021