The transitions from ads back to my game are really abrupt !

Hello !

I’m working on implementing ads in a game.
I noticed the transition when returning from ads back to the game being really abrupt. So I’ve created an empty project with just one scene and a button to trigger an ad, and still have the same issue …

Here’s an illustration of what I mean (at 37 seconds) →

The screen “flickers” when it gets back to the game.
On such a simple scene it’s not that bad but when there is actual gameplay + animation, perception gets much worse.

I’ve used Unity 2021.3.17, also tried with 2022.1.14.
Using the classic Unity Ad package.
Recorded on Android phone.

Any idea how to fix that ?

Thanks for your help :slight_smile:

I’m not seeing the same issue on my end, have you ever tested it on other devices? Also, could you share the .apk file here so I can test it?

Thanks SamOY for your quick reply, much appreciated !

I did test on 3 devices yes :

  • Realme GT Master Edition running Realme UI 4.0
  • Xiaomi Mi9T running MIUI 12.1.1
  • Redmi 7A running MIUI 12.5.3

They all have this “sideways sliding page” transition, which almost always ends up flickering.

I also thought it came from my devices but other games I’ve tested so far that use ads on Unity don’t trigger the same behavior.

Here’s the .apk → AdsTest01.apk - Google Drive (folder is public so you should have access, otherwise let me know !)

Thanks again for your support.

You are very welcome! I saw the below error message in the device log, are you trying to show another Ad when an Ad is showing? If so, this might cause problems. Please fix it first and then see if the “flickers” problem still persists.
E/UnityAds: com.unity3d.services.core.api.Sdk.logError() (line:76) :: Show invocation failed: Can't show a new ad unit when ad unit is already open

Good point, I also see this error in Android Logcat.

However I’m not sure why this is happening.

The project couldn’t be much simpler actually.
I have an AdsInitializer script that basically initializes the ads. Straight up copy paste from there :slight_smile: Initializing the SDK in Unity
And I’ve just added the “LoadAd()” call once it’s initalized :

public void OnInitializationComplete()
    {
        Debug.Log("Unity Ads initialization complete.");
        rewardedAdsButton.LoadAd();
    }

And I have a RewardedAdsButton script attached to the single button from the scene. Straight up copy paste from there also : Implementing rewarded ads in Unity

So there is just one ad that gets loaded, and I press the button just once which shows the ad (I cannot press it twice actually since it becomes non interactable once it’s pressed).

Here’s a zip file containing the whole project, would it help you help me ? :slight_smile:

Thanks a lot,
Pierre

Additional information : I tested on iOS (iPhone 6S), there is still a “sliding page” transition but no flickering it seems (00:33)

So:

  • It looks like it’s something that happens on Android only
  • I really wish this transition could be deactivated. Do you know if there is a way to configure that somehow ?

Hi there !

@SamOYUnity3D I might have another lead…
Don’t know if it’s related or not, but when I switch from another app to my app, I get the “flicker”. I guess this is related to the app going to focus again (which might be what happens when I get back from an ad ?)

In this video, I switch back and forth from my app to Dunk Shot (which I believe is also made in Unity), and Dunk Shot doesn’t get the flicker but my App does …

Could it be related to some sort of “out of focus” configuration ?

The “flickering” issue might not be caused by the Unity Ads SDK, will the app still have this issue if the Unity Ads SDK is removed?

Good question, so I created a completely empty project, no Ads SDK at all, to see if I could repro this and yes, same issue :

I also thought this might come from Mono vs IL2CPP compilation.
So I tried creating another completely empty project, no Ads, in IL2CPP and still get the flicker (note that it’s a little bit emphasized by the recording ; it’s still there without recording but a bit less pregnant) :

Maybe you can ask this in the below forums:

Ok will do that, thanks for your help :slight_smile:
Have a good day !