Search Unity

  1. Unity 2018.3 is now released.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. We've updated our Terms of Service. Please read our blog post from Unity CTO and Co-Founder Joachim Ante here
    Dismiss Notice
  4. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  5. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice

Unity Banner ads not show real ads

Discussion in 'Unity Ads' started by Dreeka, Oct 22, 2018.

  1. Dreeka

    Dreeka

    Joined:
    Jul 15, 2010
    Posts:
    504
    carsonhui likes this.
  2. jussikuosa_unity

    jussikuosa_unity

    Unity Technologies

    Joined:
    Apr 7, 2017
    Posts:
    2
    Hello Dreeka,
    can you see an error message on your device logs?

    Also, can you share on which platform you are experiencing this and snippets on initialisation and showing the banner ads?

    Best regards,

    Jussi Kuosa (Unity Ads QA)
     
  3. Dreeka

    Dreeka

    Joined:
    Jul 15, 2010
    Posts:
    504
    Hey,

    I see no error. I use the following code for init:

    Code (CSharp):
    1.  if (Application.platform == RuntimePlatform.Android)
    2.                 Monetization.Initialize(platformData.androidGameId, platformData.unityTestMode);
    3.             else if (Application.platform == RuntimePlatform.IPhonePlayer)
    4.                 Monetization.Initialize(platformData.appleGameId, platformData.unityTestMode);
    5.          
    6.             if (adsEnabled)
    7.             {
    8.                 Advertisement.Banner.Load(platformData.bannerAdId);
    9.             }
    10.  
    11.  

    and then I call the following function:
    Code (CSharp):
    1. public static void ShowUnityBannerAd()
    2.         {
    3.             if (adsEnabled)
    4.             {
    5.                 Advertisement.Banner.Show(platformData.bannerAdId);
    6.             }
    7.         }
    I am trying on an Android device (LG G4). platformData.bannerAdId and platformData.androidGameId has the correct id's, and adsEnabled is set to true.

    Also, there is another issue. If I call ShowUnityBannerAd function at start, the banner does not appear. But if I call it 4 seconds after start, it appears.

    Also, does Unity Banner ads shows AdMob ads as well, or only Unity specific banner ads?
     
  4. CloudDeLuna

    CloudDeLuna

    Joined:
    Jul 6, 2017
    Posts:
    1
    Hello Dreeka, shouldn't it be

    Advertisement.Initialize(platformData.androidGameId, platformData.unityTestMode);

    instead of
    Monetization.Initialize(platformData.androidGameId, platformData.unityTestMode);

    ?

    You can add options to Advertisement.Banner.Load to get a callback when load has succeeded or failed :
    Code (CSharp):
    1.  
    2.  
    3.     public void LoadBanner()
    4.     {
    5.         BannerLoadOptions options = new BannerLoadOptions { loadCallback = OnLoadBannerSuccess, errorCallback = OnLoadBannerFail };
    6.         Advertisement.Banner.Load(bannerPlacementId, options);
    7.     }
    8.  
    9.     private void OnLoadBannerSuccess()
    10.     {
    11.         Debug.Log("OnLoadBannerSuccess");
    12.         BannerOptions options = new BannerOptions { showCallback = OnShowBanner, hideCallback = OnHideBanner };
    13.         Advertisement.Banner.Show(bannerPlacementId, options);
    14.     }
    15.  
    16.     private void OnLoadBannerFail(string message)
    17.     {
    18.         Debug.LogError("OnLoadBannerFail reason : " + message);
    19.         //retry to show banner maybe if the reason was that the placement was not ready
    20.     }
    21.  
    That way you can see if there is an error during the loading of the Banner and show it only when it's loaded.

    Hope it helps you !

    Edit:
    For me the banners show in non-test mode only when I set the "override client test mode" to "Force test mode OFF (i.e. use production ads) for all devices" in the plateform settings on https://operate.dashboard.unity3d.com/ -> Monetization -> Plateforms -> Google Play Store/ Apple App Store -> Settings

    Edit 2:
    In fact it as worked for a few minutes but now I just get the error : "Banner placement 'horizontalBanner' is not ready"
     
    Last edited: Oct 22, 2018
  5. Dreeka

    Dreeka

    Joined:
    Jul 15, 2010
    Posts:
    504
    I have tried the following code:
    Code (CSharp):
    1. Debug.Log("Init ads");
    2. Advertisement.Initialize(platformData.androidGameId, platformData.unityTestMode);
    3.  
    4. BannerLoadOptions options = new BannerLoadOptions();
    5.  
    6. options.errorCallback += ((string message) => {
    7.     Debug.Log("Error: " + message);
    8. });
    9.  
    10. options.loadCallback += (() => {
    11.     Debug.Log("Ad Loaded");
    12. });
    13.  
    14. Advertisement.Banner.Load(platformData.bannerAdId, options);
    And when I run on my device, I get the following messages:
    Init ads
    Error: UnityAds is not initialised.

    Update:
    If I try the following code:
    Code (CSharp):
    1. Debug.Log("Init ads");
    2. Advertisement.Initialize(platformData.androidGameId, platformData.unityTestMode);
    3. StartCoroutine("ShowBannerWithDelay");
    4.  
    5. public static void Show()
    6. {
    7.     BannerLoadOptions options = new BannerLoadOptions();
    8.  
    9.     options.errorCallback += ((string message) => {
    10.         Debug.Log("Error: " + message);
    11.     });
    12.  
    13.     options.loadCallback += (() => {
    14.         Debug.Log("Ad Loaded");
    15.     });
    16.  
    17.     Debug.Log("Loading banner ad");
    18.     Advertisement.Banner.Load(platformData.bannerAdId, options);
    19. }
    20.  
    21. IEnumerator ShowBannerWithDelay()
    22. {
    23.     Debug.Log("Enter: ShowBannerWithDelay");
    24.  
    25.     yield return new WaitForSeconds(2.5f);
    26.     Show();
    27. }
    Then I get the following output:
    Init ads
    Enter: ShowBannerWithDelay
    Loading banner ad

    And no callback is called. Is the SDK broken? It only works in test mode.
     
    Last edited: Oct 23, 2018
  6. ap-unity

    ap-unity

    Unity Technologies

    Joined:
    Aug 3, 2016
    Posts:
    1,069
    @Dreeka, @CloudDeLuna

    We are aware of 3 issues with Banners at the moment:

    1. Our documentation could be a bit clearer around checking the placement status and using callbacks. The examples in this thread are more comprehensive and we'll get our docs updated as soon as we can.
    2. Banners are not currently supported for players in the EU. We are still finalizing our GDPR solution for banners.
    3. Since this is a new feature for us, there isn't a ton of banner ad inventory at the moment. We expect fill for banner ads to ramp up over time.
     
    Dreeka and carsonhui like this.
  7. ClaireO

    ClaireO

    Unity Technologies

    Joined:
    Oct 25, 2016
    Posts:
    59
    Hi,

    In this situation the device logs probably show a warning. I recommend calling the banners only when there's a signal for availability.

    This is worth to note currently however: banner delivery will start a bit later in Europe due to some kinks our team needs to work out.

    Thank you for your patience while we roll out new ad formats to our service.
     
    Dreeka and carsonhui like this.
  8. Mamoon178

    Mamoon178

    Joined:
    Jul 26, 2017
    Posts:
    2
    Hi! i want to know that how can i change the position of banner?
     
  9. Mamoon178

    Mamoon178

    Joined:
    Jul 26, 2017
    Posts:
    2
    Hi! i want to know that how can i change the position of banner?
     
    Rutger likes this.
  10. SirYagoMan

    SirYagoMan

    Joined:
    Apr 4, 2018
    Posts:
    2
    When I try to show a banner I get the follow message:

    W/UnityAds: +[USRVApiSdk WebViewExposed_logWarning:callback:] (line:53) :: Could not show banner due to No fill for placement banner

    I'm not sure of the reason. Is it because in Europe the banners are not yet available?

    Thanks!
     
  11. ap-unity

    ap-unity

    Unity Technologies

    Joined:
    Aug 3, 2016
    Posts:
    1,069
    If you are in Europe, then that is likely the reason.

    Otherwise, there may be times where a banner ad is not available, even if you implemented your code correctly. There is an expected ramp up period, but Unity is working toward fulfilling a majority of ad requests.
     
  12. SirYagoMan

    SirYagoMan

    Joined:
    Apr 4, 2018
    Posts:
    2
    Thanks for the confirmation!
     
  13. paulandjean

    paulandjean

    Joined:
    Sep 16, 2017
    Posts:
    1
    Is there some sort of test banner ad that should be coming up when initializing in this way:

    Advertisement.Initialize("0000000", true);
     
  14. Ferannor

    Ferannor

    Joined:
    Aug 14, 2017
    Posts:
    1
    I've release my game last week and just discover this issue with Europe.
    Have you any date to communicate about when this will be fix?

    Thanks.
     
    Cenda likes this.
  15. mudi_256

    mudi_256

    Joined:
    Jan 17, 2018
    Posts:
    1
    i have an issue with unity banner ads not shown when test mode false . onUnityBannerErrors i receive a message "Banner placement <placemeny ID> is not ready"
    i'm using android studio for showing banner test is working perfect.
    for implementation i follow the unity3d official documentation.
    https://unityads.unity3d.com/help/android/integration-guide-android
     
  16. ap-unity

    ap-unity

    Unity Technologies

    Joined:
    Aug 3, 2016
    Posts:
    1,069
    @mudi_256

    Banners are now available in all regions, depending on our available inventory. We're currently working with our demand partners to ensure Unity developers are able to receive bids and impressions. There is an expected ramp up period but Unity is working toward fulfilling a majority of ad requests.