Adding in a cooldown

Ads are great for developers; however, according to Unity's Monetization FAQs, each user is only able to view 25 ads per day. With that in mind, we will likely want to make it so that players can only trigger ads every once in a while. This also has the benefit of making players want to come back to our game after a period of time.

For more information on Unity's Monetization FAQs, check out https://unityads.unity3d.com/help/faq/monetization.

We will now program it so that our Continue option will only work once in awhile, perhaps with a short delay that we can easily customize if we'd like:

  1. To get started, let's dive into our UnityAdController script. We need to add a new variable to it, as you can see in the following ...

Get Unity 2017 Mobile Game Development now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.