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

My game takes 5 minutes to initillize Unity Ads after being offline

Discussion in 'Unity Ads & User Acquisition' started by DAPPSD, Oct 29, 2018.

  1. DAPPSD

    DAPPSD

    Joined:
    Apr 26, 2018
    Posts:
    47
    My game has Unity Ads in it and I try showing Rewarded Ad after being offline and it takes Unity more than 5 minutes to initiallize the Ad services even when I manualy tell it to initiallize (according to my device's debug logs Unity doesn't even try to initiallize when I tell it to, it only tries to initiallize when it wants to)

    I'd love to get some help, thanks :)

    This is my code for initiallization:
    Code (CSharp):
    1. if (!Advertisement.isInitialized)
    2.                     Advertisement.Initialize(GameID, IsTestModeOn);
    *GameID is set to the current platform's game ID in the Start methode
    *IsTestModeOn is set to "true" so that I'll see only test ads
    *I have no problem with showing ads (regular and rewarded are both working great), the only problem is the delay that's happening when I go online after opening the game while being offline, and trying to initiallize, load and show rewarded ad, it's just too big of a delay (the player for sure would think the game froze or the ads are broken and won't use this feature)
     
  2. DAPPSD

    DAPPSD

    Joined:
    Apr 26, 2018
    Posts:
    47
    Still need help with this, anyone here knows what should I do? or if I'm doing something wrong?
     
  3. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    To go offline, are you simply turning off WiFi? Once you turn it back on, have you confirmed that you can reach the internet? (e.g, using the device browser, etc)
     
  4. DAPPSD

    DAPPSD

    Joined:
    Apr 26, 2018
    Posts:
    47
    Yes, I'm getting notifications from other apps that use the Interent..

    And the device's logs show that when I run the code above (in order to initillize Unity Ads) it doesn't even try to initillize, not getting any logs related to Unity Ads,not "passed" logs and not "failed" logs of initillization, and the Unity Ads is only initillize about 5 minutes later when its auto-initillize is trying by itself to initillize...
     
  5. DAPPSD

    DAPPSD

    Joined:
    Apr 26, 2018
    Posts:
    47
    I'd love to get some help.. :)
    You can even try and see for yourself that this is not a problem in my code or my project, try building android build with Unity Ads and open the app while being offline and then turn on your Internet ans see that it doesn't even try to initillize when you tell it to, it only initillizes when the courotine of the auto initillize re-tries to inillize and it take a while untill it is finally initiallized...
     
  6. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Please perform the browser test that I described and provide the results. Perform this test while you're waiting the 5 minutes for the ads to show.
     
  7. DAPPSD

    DAPPSD

    Joined:
    Apr 26, 2018
    Posts:
    47
    It's still not initillizing, even after leaving the game going to the build-in browser and going to few websites and seeing that there's internet connection, it's still takes too much time till it's initillized... (and still it's not even trying to initillize when i tell it to)
    *still using test ads
    *still the same problem on both IOS and Android

    Also I know that Unity Ads has about 97% fill rate but I was wondering if there's a way to check if there are ads available before trying to show ads, because in my game I show ads in between levels and I'm not letting the game go to the next level if an ad wasn't shown to the player, but if there are no ads available then the user will never be able to go to the next level, so I wanted to know if tehre's any way of checking if there are ads available or not and in case there aren't any ads to show the user then let the game go to the next level even tho the player didn't watch an ad..
    I know that there's the "IsReady" option to see if an ad is ready to be shown, but what i'm asking is different than checking if the ad need few more seconds of loading before being shown, i'm asking if there's an ad to show at all...


    Thanks again for the help! :)
     
  8. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    isReady does mean that the ad is ready to show.
     
  9. DAPPSD

    DAPPSD

    Joined:
    Apr 26, 2018
    Posts:
    47
    Yes I know that, but I need to know if there's an ad at all not if there's no ad which is ready to be shown, because isReady will be false both when there isn't ad ready to be shown and when there isn't ad at all, and I need to know when there's ad to be shown but it is just not ready yet and in few seconds it will be, and when there isn't any ad at all not even in 5 minutes....
    Unity Ads has 97% fill rate and I don't want the 3% to not be able to play my game because there's no ad to be shown in their region..
     
  10. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Not quite sure I follow - "both when there isn't ad ready to be shown and when there isn't ad at all". We don't know if there is an ad that will fill your request until we make the request, and until it's filled, isReady is false. You should be prepared in your game for no fills and not block the user waiting.
     
  11. DAPPSD

    DAPPSD

    Joined:
    Apr 26, 2018
    Posts:
    47
    That's what i'm asking... if there's any way to send a request to see if ads are available at the moment...
    But if I don't block the user then they just will be able to turn off wifi and 4G and just play uninterrupted with no ads...