[UNITY ADS] Right way to present ads

Hello guys, I’m wondering which is the best way to handle the presentation of ADS windows with the unity ads plugin.

Before presenting and ads with the Advertisment.Show function I normally disable the main camera and I enable it again when the ADV is dismissed and clear memory as much as possible with Resources.UnloadUnusedAssets();.

Without these “tricks” I encountered cases where the memory consumption jumped to huge numbers crashing the game.

Are there any specific tasks to follow before presenting the ADS?

Hi @Bitwak , thank you for reaching out! Sorry to hear about the issues with crashing!

In general, when an ad is ready, you should just be able to call Advertisement.Show without issues. Would you be comfortable sharing the full code you are using for your ads logic? This is an interesting case, and we would like to investigate further.

Also, would you mind please confirming how you’re testing this? Are you testing with a physical device? What model and OS version? Are you using test ads or production ads?

Thanks!

Hello @Unity_Quinn , I’m going to open a ticket to share all the needed info.
We are testing on iOS (the memory issue is reproducible with both iOS 14 and 15). I have identified a specific case where it happens systematically, where we are showing two full-screen canvas. The only option we found to fix the memory issue is to disable our main camera.

Should I mention you in the ticket?

Hi @Bitwak ,

Thank you for following up on this. If you haven’t already created the ticket, can you please include a link to this forum thread?

I appreciate your help here and hope that we can get this sorted out as soon as possible :slight_smile:

Hello @Unity_Quinn , I still have to open the ticket! my apologies… we are working at a release. I’ll do my best to share it before the end of the next week