Search Unity

Unity Ads 2.0 IsReady() return false

Discussion in 'Unity Ads & User Acquisition' started by leoncorrl, Aug 23, 2016.

  1. leoncorrl

    leoncorrl

    Joined:
    Apr 27, 2014
    Posts:
    15
    Hi, I just upgraded my unity ads to the version 2.0 in the asset store. I initialize correctly but when I call the IsReady function always returns false.

    I tried it with the previous version and running, but with this new version 2.0 does not work. Also i am using unity 5.4.0p1
     
  2. AVOlight

    AVOlight

    Joined:
    Apr 15, 2014
    Posts:
    427
    same thing here 5.4.0p2 only in Windows Editor
    working on Mac Editor, iOS and Android
    also noticed performance issues on both iOS and Android that were not present before upgrading to 2.0
     
  3. rasmus-unity

    rasmus-unity

    Moderator

    Joined:
    Aug 15, 2014
    Posts:
    1,312
    Hi,

    Just tested here with Unity Ads SDK 2.0 from Asset Store and Unity 5.4.0p2 on Mac. No problems showing Ads, neither "in-Editor-placeholder" or real ads on an Android device.

    Just to make sure, which platforms are you seeing this on? Above post mentions Windows editor problems, but are there also other platforms?

    Thanks,
    Rasmus
     
  4. AVOlight

    AVOlight

    Joined:
    Apr 15, 2014
    Posts:
    427
    @rasmus-unity i only had an issue with IsReady() in the Unity editor on windows

    also noticed a separate issue; which was gameplay lag on low-end iOS and Android devices
     
  5. rasmus-unity

    rasmus-unity

    Moderator

    Joined:
    Aug 15, 2014
    Posts:
    1,312
    @leoncorrl, which platforms have you experienced this on?
     
  6. leoncorrl

    leoncorrl

    Joined:
    Apr 27, 2014
    Posts:
    15
    I'm using Unity Ads 2.0 with unity 5.0.4p1 in Window 7. I have only tested this version in Editor for Android but the only problem is with function IsReady () always returns false.

    It should be noted that invokes the function correctly and it is initialized

    Advertisement.Initialize(MY_GAME_ID,true);

    I have also tried to remove the SDK and use the old version that comes bundled with unity and working properly.
     
  7. MrDasix

    MrDasix

    Joined:
    Feb 15, 2015
    Posts:
    64
    I hae the same problem, in the editor returns false but in android devise it shows an ad and works OK
     
  8. breban1

    breban1

    Joined:
    Jun 7, 2016
    Posts:
    194
    Advertisement.IsReady(zone) always returns FALSE for me on Android with Unity Ads 2.0. isSupported=true and isInitialized=true, but I isReady(zone) return false. I have the correct zoneID and gameID set up.

    It was working about a week ago. I'm using Unity 5.4.0f3.
     
  9. rasmus-unity

    rasmus-unity

    Moderator

    Joined:
    Aug 15, 2014
    Posts:
    1,312
  10. DarylB

    DarylB

    Joined:
    Dec 28, 2015
    Posts:
    5
    I'm also experiencing this problem: Advertisement.IsReady() is always returning false in the Editor and when running on Android.
     
    Last edited: Sep 11, 2016
  11. zedsmith52

    zedsmith52

    Joined:
    May 10, 2017
    Posts:
    9
    Did this ever get resolved?
    I'm having the same problem and it's nearly 2 years after the last post.
     
  12. rasmus-unity

    rasmus-unity

    Moderator

    Joined:
    Aug 15, 2014
    Posts:
    1,312
    Sorry for leaving this thread open/unanswered. There is (usually) no problem with Unity Ads in these situations, but related to either device (no network connection etc) or integration (e.g. using incorrect game id).

    @zedsmith52, please check device logs, either using "adb logcat" or Xcode. Unity Ads SDK will log any errors there. Also please include which version of Unity, Ads SDK etc you are seeing the issue on.

    Thanks,
    Rasmus
     
  13. zedsmith52

    zedsmith52

    Joined:
    May 10, 2017
    Posts:
    9
    No worries, I really appreciate you getting back to me.

    I've not deployed to a device, so it's all in unity at the moment - I'm expecting to see a unity splash page or something, but I'm getting the false of death.
    I'm on the latest version of unity (updated just in-case), using Ads 2.0 on windows 10.
    It may be that I've got the wrong project name, so may need to init against ID or something ...

    I'm afraid I'm a real newby so some of this is going over my head!
     
  14. rasmus-unity

    rasmus-unity

    Moderator

    Joined:
    Aug 15, 2014
    Posts:
    1,312
    Have you switched platform in Unity to either Android or iOS?

    /Rasmus
     
  15. zedsmith52

    zedsmith52

    Joined:
    May 10, 2017
    Posts:
    9
    Yes, I've tried switching between them, but can't ever get away from the "false of doom" ... I have also tried using the internal as well as plugin version of Ads ... I'm thinking that there may be an easier to implement 3rd party solution? What are people's experiences there?
     
  16. rasmus-unity

    rasmus-unity

    Moderator

    Joined:
    Aug 15, 2014
    Posts:
    1,312
    You are of course welcome to try other ad networks, but would still like to know why your project fails.

    We have an example project (which is also used internally here for testing new Unity versions) available at https://github.com/Unity-Technologies/unity-ads-assetstore-test. If you have time, can you try with that project, to see if that works on your setup?

    Thanks,
    Rasmus
     
  17. zedsmith52

    zedsmith52

    Joined:
    May 10, 2017
    Posts:
    9
    Thanks, Rasmus, I'll give it a go and see what happens.
    Unfortunately I can only get on my Unity machine in the evenings and some weekends, so don't expect a rapid turn around ;)

    This is really painful as it's the last thing I'm waiting on to get my game compiled and out into the wild! So I'm really appreciating that you've taken the time to help - thank you!!
     
  18. rasmus-unity

    rasmus-unity

    Moderator

    Joined:
    Aug 15, 2014
    Posts:
    1,312
    @zedsmith52, if we can somehow get access to your project files, we can take a look to see if we can reproduce the issue on our side.

    /Rasmus
     
    zedsmith52 likes this.
  19. zedsmith52

    zedsmith52

    Joined:
    May 10, 2017
    Posts:
    9
    Can I give you something that will make this possible, such as a project ID?
    UPID ca868ffe-cbe8-44d7-b73a-f85decf986b4
     
  20. zedsmith52

    zedsmith52

    Joined:
    May 10, 2017
    Posts:
    9
    Thanks to Rasmus helping in the background, we have it working!! woohoo!!
    The fix was because IsReady() does equal false on initialisation and takes a few seconds to become true ... what you can do is say (in sudo c sharp):
    Code (CSharp):
    1. private bool readyFlag = true;
    2.  
    3. void Update () {
    4. if (Advertisement.IsReady() && readyFlag) {
    5.    //show your advert
    6.    Advertisement.Show();
    7.    readyFlag = false;
    8. }
    9. }
    10.  
    11. }
    or something like that ;)

    This fixed the issue for me immediately.
     
    Last edited: Aug 13, 2018