Ad code help

Hello I’m kind of looking for some code or some help for basically the following

check if unity ad is ready and show it if not show ad from say chartboost and if that fails just show my own ad basically saying they need to be online.

thanks

You just defined the early days of ad mediation. http://blog.soom.la/2016/05/ad-mediation-ssp-ad-server-whats-difference.html

These days mediation in general promotes they’re doing revenue optimisation by choosing the best ad network each time. Back in the days when ad networks were smaller and there weren’t always ads to show - mediation was there to ensure there’s always “fill”. What you’re describing is ensuring there’s always fill.

Unity Ads has about 100% fill globally - due to this, it might not be worthwhile to integrate a mediation solution for backfill. You can however check if ads are initialised and ready - and if they’re not, you can show your own ad instead.

Note that after Unity Ads initialises - it takes a few seconds for ads to be ready. This is why Advertisement.IsReady() initially returns false (until it has downloaded the ads).

With this in mind - if you still wish to use mediation - there’s a number of ad mediation solutions out there to choose from. I’m refraining from mentioning any single service name since there’s a lot of them and I don’t want to leave out any.

I hope this helps.