Version: 5.6
Removed

ADBannerView

class in UnityEngine.iOS

매뉴얼로 전환
Obsolete

설명

ADBannerView is a wrapper around the ADBannerView class found in the Apple iAd framework and is only available on iOS.

It provides a view that displays banner advertisements to the user.

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; } }