Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Google Ad Placements LoadAd() Warning

Discussion in 'General Discussion' started by JM_Elbambo, Apr 28, 2021.

  1. JM_Elbambo

    JM_Elbambo

    Joined:
    Apr 24, 2021
    Posts:
    1
    I am new to Unity in general. I am trying to implement AdMob using Ad Placements.

    I followed the official Google AdMob Unity Ad Placements docs to load a test banner ad.
    (Code shown in the docs)
    upload_2021-4-28_21-46-20.png

    (My code)
    upload_2021-4-28_21-47-40.png

    It works as expected. However, the editor shows a warning when I run the game.
    (Warning in the editor)
    upload_2021-4-28_21-49-5.png

    The warning disappears when I remove the line bannerAd.LoadAd(), so I suppose the warning has something to do with the LoadAd() method.
    How do I fix this? Thanks in advance.
     
  2. Munchy2007

    Munchy2007

    Joined:
    Jun 16, 2013
    Posts:
    1,732
    You've asked the question in the wrong forum, this isn't a support forum. Should probably have been in Platforms>Android or Scripting.

    However, you can ignore the warning. It stems from the code that shows an ad placeholder when running the app in the editor and doesn't appear to stop it from working. It is conditionally compiled out of the game build.
     
    Last edited: Apr 28, 2021
    JM_Elbambo likes this.
  3. xjjon

    xjjon

    Joined:
    Apr 15, 2016
    Posts:
    610
    You can ignore it, that is something in the admob SDK for a long time. As far as I remember it only happens when you play in editor. For android / iOS it won't have this.
     
    JM_Elbambo likes this.