private void ShowAdButton_Click(object sender, System.EventArgs e) { // If no banner exists, show one; otherwise remove the existing one: if (bannerView == null) { // Optionally specify the banner’s anchor position: UnityBanners.SetBannerPosition(BannerPosition.BottomCenter); // Request ad content for your Placement, and load the banner: UnityBanners.LoadBanner(this, _placementId); } else { UnityBanners.Destroy(); bannerView = null; } }
public void LoadBanner() { // Request ad content for your Placement, and load the banner: UnityBanners.LoadBanner(this, _placementId); }