I'm using this code but I don't know how to check if the ad is showing. If the ad isn't showing i wan't it to show an admob ad and if the IAds start to show, remove the admob and show the IAds.
using UnityEngine;
using System.Collections;
public class IAdScript : MonoBehaviour {
private ADBannerView banner = null;
void Start()
{
banner = new ADBannerView(ADBannerView.Type.Banner, ADBannerView.Layout.Bottom);
ADBannerView.onBannerWasClicked += OnBannerClicked;
ADBannerView.onBannerWasLoaded += OnBannerLoaded;
}
void OnBannerClicked()
{
Debug.Log("Clicked!\n");
}
void OnBannerLoaded()
{
Debug.Log("Loaded!\n");
banner.visible = true;
}
}
↧