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.
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 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 ?
@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 ?
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) :