App Open

Create a request to load the ad.

You should call this part of the code once at the beginning.

using UnityEngine;
using AdManagerPro;
public class Test : MonoBehaviour
{
    private void Start()
    {
        // Requests to download advertisements 
        AppOpenAdManager.LoadAppOpenAd();
    }
}

Show App Open

To trigger an App Open ad, you need to perform a check when the application is minimized by the player, as shown in the example below.

private void OnApplicationPause(bool pause)
    {
        if (pause == false)
        {
            AppOpenAdManager.ShowAppOpenAd();
        }
    }

If you need to check the availability/loading status of the ad, include the following code snippet:

using UnityEngine;
using AdManagerPro;
public class Test : MonoBehaviour
{
    private void Start()
    {
        if(AppOpenAdManager.isAdmobAppOpenReady){
            Debug.Log("The ad is available.");
        }
    }
}

Last updated