We use the User Path system to get the ads work. The User Path system allows to create a node-based scripts, that can works during a session or even whole application lifetime. Currently there is only one case where we use it, but there is a lot of other cases where it can be used.

Let's try to open the Regular Ads user path to understand how it works. First of all open the Dashboard and click on the User Path tab. Select RegularAds element and press Edit button.

ani (0).gif

Here is the scheme you will see:

Untitled

First of all, we have an App Event node — this is the node that runs the script. It starts to work with a Launch event. It means that this script will run every time we run the game.

As soon as we launch the game we go to the next node: Wait. Here we start to wait for 90 seconds and only than we go to Ad Preload node. This node checks do we have any preloaded ads and, if not, it starts to load one.

When at least one ad has been preloaded, we go to the next node: Wait Page. This node allows us to wait one of the pages we need. In this case we wait for Loading — there we want to show interstitial ads.

And finally, when we reached to target page, we go to the Ad Show node — here we will show the preloaded ad.

When the ad has been shown, we need to start the script again. To do this we have two additional connections:

This script can be modified as you want. Read more information about editing this type of nodes in the next topic:

YNodes

For showing the ads you need to integrate ads services. Read more about how to do that:

Google AdMob

Unity Ads