Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

UnityAds: Black Screen when returning to app (Android)

Discussion in 'Unity Ads & User Acquisition' started by GastonC, Oct 13, 2014.

  1. GastonC

    GastonC

    Joined:
    Aug 26, 2012
    Posts:
    38
    I'm testing unityAds on my soon to be released game, and the videos show fine, but after the 2nd or 3rd view, after coming back from the video, the screen stays black, and I have to reopen the game.

    Also happens with the test project they provide (I installed it using the asset store plugin).

    Any help?
     
  2. unity-nikkolai

    unity-nikkolai

    Unity Technologies

    Joined:
    Sep 18, 2014
    Posts:
    540
    We've had a few devs bring up the same issue lately. Currently looking into the cause. Hope to have this resolved for you soon. Thanks for reporting!
     
  3. db82

    db82

    Joined:
    Mar 14, 2012
    Posts:
    24
    Hi, did you find a fix for this?

    Thanks for any info.
     
  4. unity-nikkolai

    unity-nikkolai

    Unity Technologies

    Joined:
    Sep 18, 2014
    Posts:
    540
    I think so, haven't been able to reproduce the issue in a while, though.

    Would you mind trying this workaround and let me know how it works for you? Attach it to any GameObject in your scene and toggle on usePauseOverride. Then build the app to your device.

    Let me know how it works out. Thanks!
     
  5. db82

    db82

    Joined:
    Mar 14, 2012
    Posts:
    24
    Hi

    I tried that work around but if didn't help for me. I found that performing logic triggered by the resultCallback action was causing problems. For example, saving to google cloud or firing off analytics. However this would only cause an issue for every 2nd or 3rd video.

    I fixed it by making sure any logic gets called at least 1 frame after the resultCallback (to make sure the game had received focus).

    Thanks for your help though.
     
    unity-nikkolai likes this.
  6. NatthapolVanasrivilai

    NatthapolVanasrivilai

    Joined:
    Sep 3, 2014
    Posts:
    13
    I'm also starting to experience this in my app. I have to press the back button once to return to the game again. :eek:
     
  7. furious.midget.giraffe

    furious.midget.giraffe

    Joined:
    Feb 19, 2015
    Posts:
    2
    I have the same problem... and more people also. More here
     
  8. wenkly

    wenkly

    Joined:
    Sep 4, 2014
    Posts:
    12
    I have this problem when building on unity5.
     
  9. unity-nikkolai

    unity-nikkolai

    Unity Technologies

    Joined:
    Sep 18, 2014
    Posts:
    540
    The issue you're seeing with the end screen started occurring just a few days ago, and is something we're currently researching. We haven't identified the cause yet. Perhaps you can help us by answering the following questions:
    1. How often do you see the black screen when an ad is shown?
    2. Which ad campaigns are shown leading up to this issue occurring?
    3. Which country/region are you viewing ads from?
     
  10. HeikkiTunkelo

    HeikkiTunkelo

    Unity Technologies

    Joined:
    May 13, 2014
    Posts:
    104
    A Quick update on this issue:

    We found out that our CDN (contend delivery network) where all files (like the video end-card) are downloaded from, is returning mismatching content type with headers (Headers tell that content is Gzipped, but the file sent is actually not sent => Therefore UI is broken). This only happens on some countries (atleast in Germany and Russia, might be others).

    We are currently fixing this, I'll update when this is fixed.

    Cheers,
    Heikki
     
  11. Rakeshkr590

    Rakeshkr590

    Joined:
    Mar 7, 2013
    Posts:
    9
    @HeikkiTunkelo Hi mate i am still getting this issue when UnityAds are displayed in India/Japan, Could you tell me if this is fixed or not please thank you.
     
  12. Chilipalm Games

    Chilipalm Games

    Joined:
    Aug 2, 2015
    Posts:
    1
    I'm having this issue currently only when running on an actual Android device (Nexus 5). Only way I could find a workaround this is by essentially by destroying and recreating all the visible game objects into the scene after the advertisement has been closed.

    Also a note regarding this: The "black screen" actually has a slight black to gray gradient, my uneducated guess would be the Ad framework is not cleaning up all the gameobjects it's creating for the advertisement.

    I can send you guys source code if you have trouble reproducing this.
     
  13. dousi96

    dousi96

    Joined:
    Jul 28, 2014
    Posts:
    23
    I've go the same problem on Samsung Galaxy tab 3 8.0"