#pragma strict
public class NewBehaviourScript extends MonoBehaviour {
private var banner: iOS.ADBannerView = null;
function Start() {
banner = new iOS.ADBannerView(iOS.ADBannerView.Type.Banner, iOS.ADBannerView.Layout.Top);
iOS.ADBannerView.onBannerWasClicked += OnBannerClicked;
iOS.ADBannerView.onBannerWasLoaded += OnBannerLoaded;
iOS.ADBannerView.onBannerFailedToLoad += OnBannerFailedToLoad;
}
function OnBannerClicked() {
Debug.Log("Clicked!\n");
}
function OnBannerLoaded() {
Debug.Log("Loaded!\n");
banner.visible = true;
}
function OnBannerFailedToLoad() {
Debug.Log("FAIL!\n");
banner.visible = false;
}
}
using UnityEngine;
using System.Collections;
using ADBannerView = UnityEngine.iOS.ADBannerView;
public class NewBehaviourScript : MonoBehaviour {
private ADBannerView banner = null;
void Start()
{
banner = new ADBannerView(ADBannerView.Type.Banner, ADBannerView.Layout.Top);
ADBannerView.onBannerWasClicked += OnBannerClicked;
ADBannerView.onBannerWasLoaded += OnBannerLoaded;
ADBannerView.onBannerFailedToLoad += OnBannerFailedToLoad;
}
void OnBannerClicked()
{
Debug.Log("Clicked!\n");
}
void OnBannerLoaded()
{
Debug.Log("Loaded!\n");
banner.visible = true;
}
void OnBannerFailedToLoad()
{
Debug.Log("FAIL!\n");
banner.visible = false;
}
}