Search Unity

Pause and Resume video on Application Pause and Resume

Discussion in 'Unity Ads' started by Gangsta-Geek, Jan 29, 2015.

  1. Gangsta-Geek

    Gangsta-Geek

    Joined:
    Aug 11, 2012
    Posts:
    18
    Hey everyone! So I've been having issues with unityAds pausing and resuming in Unity for iOS. While watching an AD if you press the "home button" (which pauses the app) when you resume the app the AD does not resume playing. Also the game would not resume. I fixed the game not resuming part by editing Egine.cs private static void PauseGame() and private static void ResumeGame(). Basically I commented the whole thing out. Is there a way to actually pause the Ad when the application is paused by the home button?
    I've searched and I cant find the answer. Crossy Road has clearly fixed this problem but sometimes the Ad does not resume as well. Thanks!

    Unity 4.61
     
  2. unity-nikkolai

    unity-nikkolai

    Unity Technologies

    Joined:
    Sep 18, 2014
    Posts:
    541
    In the latest version of Unity Ads (1.0.4), pressing the home button causes the ad to be skipped. It should also close out the ad and return the user to the game when the user brings the game back to the foreground.

    I agree, we should continue the ad were it left off, but we don't have that sort of functionality built in yet.
     
  3. Gangsta-Geek

    Gangsta-Geek

    Joined:
    Aug 11, 2012
    Posts:
    18
    If that is the case how did Crossy Road achieve that functionality?
     
  4. unity-nikkolai

    unity-nikkolai

    Unity Technologies

    Joined:
    Sep 18, 2014
    Posts:
    541
    It might not have been a Unity Ad that was shown. We're not the only ad network in their game.
     
  5. Gangsta-Geek

    Gangsta-Geek

    Joined:
    Aug 11, 2012
    Posts:
    18
    Okay thanks for the quick reply. One more question is it possible to have 2 different type of ads inUnity. One ad for rewarding and another ad like the picture ads?
     
  6. Jack-Yee

    Jack-Yee

    Joined:
    Sep 7, 2013
    Posts:
    7
    Hi folks,

    Just wondering -- is this a legitimate bug? We hare having a problem where our game doesn't resume because we never receive the callback that was set through ShowOptions and calling method Advertisement.Show()?
     
  7. unity-nikkolai

    unity-nikkolai

    Unity Technologies

    Joined:
    Sep 18, 2014
    Posts:
    541
    Yeah, think that is a legitimate bug. Try this workaround and let me know if it helps.
     
  8. Jack-Yee

    Jack-Yee

    Joined:
    Sep 7, 2013
    Posts:
    7
    Hello,

    Thanks -- I implemented the "hack" and put game specific code to resume the time scales and it all works out. Should I file a bug/feature request for this?

     
  9. unity-nikkolai

    unity-nikkolai

    Unity Technologies

    Joined:
    Sep 18, 2014
    Posts:
    541
    This one is a known one. It'll have to get worked out in the next update. Thanks, though.
     
  10. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    Hi Nikkolai,

    I have also come across this bug using Unity 4.6.2p2 (Latest Ads Release), I have not tried the workaround yet but I would like to ask when the next release of Unity Ads will happen, currently waiting for a few small fixes, you have provided work around for all but when lot is going on, saves time in one package.

    Thanks
     
  11. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    Bump - waiting for next update news!
     
  12. codewookie

    codewookie

    Joined:
    Mar 4, 2015
    Posts:
    2
    Hi,

    Just wondering if this functionality has been implemented yet in latest version of Unity Ads? It still seems that pressing the home button skips the ad.

    Thanks,
     
unityunity