Hello fellas, i’m currently making a 2d game with unity and put a rewarded ad when pressing a button in it. When i declare an if statement asking if(advertisement.isReady()){
Advertisement.show(placement_id)
}
The ad doesn’t show (i already activated test mode)
And if i get rid of the if statement and write advertisement.show in a function and assign it to the button it shows without problem. The question is is it really necessary to write if advertisement.isReady() ?
You can try to show ads without checking if they are ready first, but you will receive an error if no ad is available. Note that ads will always be available inside test mode, so it may be working now but may fail once you deactivate test mode.
Make sure you are initializing the SDK as soon as possible once launching your app to give time for ads to preload.