I’m upgrading from Ads 3.75 to 4.2.1 and among other things, noticed the Advertisement.IsReady()
method has been removed.
I assume I can replicate it using the various listener interfaces and callbacks and track whether a placement ID has been loaded thus being ready?! However, the IsReady
method was quite convenient and I wonder why you would remove it?
Now I have to replicate the functionality in our code base instead and this costs me time and is probably less robust than what an entire dedicated Ads team can implement.
Hi Peter,
It definitely appears that the Advertisement.IsReady() method has been deprecated. In its place, we highly suggest using Listeners (e.g. IUnityAdsLoadListener, Interface IUnityAdsLoadListener | Advertisement | 4.2.1). To add it, make sure your class inherits from it. By using this listener’s OnUnityAdsLoaded method, you can add the piece of code that shows the ad.
In fact, these Listeners are more reliable than the IsReady() method. While IsReady() might not have reset, the Listener is definitely called when certain events happen (e.g. when an ad is loaded or when it has failed to load).
Hope this helps!
Cheers