How to re-request Unity Ads if the first request failed?

Imagine the player was not connected to the internet when Unity Ads was initialised.

How can I make the game re-request the ads at a later stage, when the player has access to the internet?

Like so:

if (Advertisement.isReady ()) {
// code to reinitialise or request again??

}

I have the same question please. Do I have to switch to another ad network if Unity ads initialize failed? or any solution working?

i personally put My Unity Ad Implementation class in the beginning (Splash screen) scene to initialize on start of game, and also i put it on the game scene.
and in the start i check for !isInitialized
void InitializeAds() {
if (!Advertisement.isInitialized) {
#if UNITY_ANDROID
Advertisement.Initialize (gameIDForAndroid, false);
#endif
#if UNITY_IOS
Advertisement.Initialize (gameIDForIOS, false);
#endif
}
}
So every scene in my game it checks if advertisments are initialized and if not, initializing it :smile:

i found issue.
test ads does not show.

Error :- Unity Ads show failed: Webapp timeout, shutting down Unity Ads

Since this thread is a bit old, any issues you encounter today are probably not the same issues from this thread. Could you create a new thread and provide more details. Specifically, it would be helpful to know:

  • Are you building your game with Unity, XCode, or Android Studio?
  • If Unity, which version are you using?
  • Which version of the Ads SDK are you using?
  • Can you share the code you are using to integrate Unity Ads?
  • Can you provide a device log from your app when Unity Ads is initialized?
  • Are you using mediation? If so, which version of the mediation SDK and adapter are you using?
  • How pervasive is this problem? Is it reproducible 100% of the time or do you have metrics on how often it happens?