- Home /
Is it Possible to Simulate UnityAds Load Failure?
I'm currently working a project in which I'm implementing rewarded video ads. When a video ad isn't available I want to hide the user prompt, but I think that with test mode enabled the ad fill rate is 100%. Is there a way for me to simulate ads not being available without leaving test mode?
Answer by plsright · Aug 04, 2016 at 02:42 AM
Since I couldn't find anything online I emailed the Unity Ads support team and got exactly what I was looking for. In hind sight their solution should have been fairly obvious but I'll share it here just in case anybody else is curious.
To prevent an ad from loading while in test mode you can do one of two things:
Initialize the SDK with an invalid game ID such as '0', this way ads cannot be provided and will allow you to test events that occur advertisements are not ready.
The other option is to enable airplane mode or disconnect from any form of internet connection being provided to your device. This way ads can't download and the
isReady()
method will return false
Your answer
