Skip to main content

Banner Ads

Banners are persistent native overlays rendered on top of the Unity view. They stay visible until paused or destroyed.

Banners are native overlays and do not appear in the Unity Editor Game view — test on a real device.

Each ad format uses a Zone ID configured in the Empower dashboard.

Loading a Banner

using Empower.MobileAds;

// 320x50 banner (default size)
EmpowerAds.LoadBannerAd("YOUR_BANNER_ZONE_ID");

// Custom-sized banner
EmpowerAds.LoadBannerAd("YOUR_BANNER_ZONE_ID", width: 728, height: 90);

// Temporarily hide (preserves resources)
EmpowerAds.PauseBannerZone("YOUR_BANNER_ZONE_ID");

// Show again
EmpowerAds.ResumeBannerZone("YOUR_BANNER_ZONE_ID");

// Permanently remove and free resources
EmpowerAds.DestroyBannerZone("YOUR_BANNER_ZONE_ID");

Load the banner after OnSdkReady. Listen for status via OnBannerStatusChanged:

EmpowerAds.OnBannerStatusChanged += (status, zoneId) =>
{
if (zoneId != "YOUR_BANNER_ZONE_ID") return;
switch (status)
{
case AdStatus.Ready: /* banner is visible */ break;
case AdStatus.Failed: /* hide your container / show fallback */ break;
case AdStatus.Clicked: break;
}
};

Key statuses: Ready (visible), Failed, Clicked, Impression.

EmpowerBannerAd Component (no-code)

Attach the EmpowerBannerAd MonoBehaviour to any GameObject and configure it in the Inspector.

PropertyDescription
Zone IDYour banner zone ID.
WidthBanner width in dp/points (default 320).
HeightBanner height in dp/points (default 50).
Auto LoadLoads automatically in Start() when checked.
On Status ChangedUnityEvent fired on status change.

Behavior: loads on Start() (if Auto Load + a Zone ID are set); pauses on OnDisable and resumes on OnEnable; destroys on OnDestroy.

var banner = GetComponent<EmpowerBannerAd>();
banner.ZoneId = "my_zone";
banner.Width = 728;
banner.Height = 90;
banner.Load();
banner.Destroy();

banner.OnStatusChanged += (status) => Debug.Log($"Banner: {status}");

Best Practices

  • Load after OnSdkReady — don't load before the SDK signals it is ready.
  • Match the size to a real ad size (320x50, 320x100, 300x250) unless you have custom creatives trafficked.
  • Handle Failed — hide the container or show fallback content so you don't leave a blank space.
  • Use PauseBannerZone/ResumeBannerZone (or the component's enable/disable) instead of destroying and reloading on every screen change.