Banner

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
        BannerAdManager.RequestAdBanner();
    }
}
BannerAdManager.RequestAdBanner(AdPosition.Top); 

SHOW, HIDE, or DESTROY

You can SHOW, HIDE, or DESTROY the banner using the following code snippets:

  • Show Banner:

    BannerAdManager.ShowAdBanner();
  • Hide Banner:

    BannerAdManager.HideAdBanner();
  • Destroy Banner:

    BannerAdManager.DestroyAdBanner();

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(BannerAdManager.isAdmobBannerReady){
            Debug.Log("The ad is available.");
        }
    }
}

Last updated