Banner
Is Banner Supported
Check if the platform supports displaying banner ads. Use this to determine if you can include banner advertisements in your game.
// Possible values: true, false
Bridge.advertisement.isBannerSupported
Show Banner
Display a banner ad within your game to generate revenue through advertising.
private void Start()
{
var position = BannerPosition.Bottom; // optional, 'Top' | 'Bottom', default = Bottom
var placement = "test_placement"; // optional
Bridge.advertisement.ShowBanner(position, placement);
}
Hide Banner
Hide the currently displayed banner ad when it is no longer needed.
Bridge.advertisement.HideBanner()
Banner State
Monitor the state of the banner ad (loading, shown, hidden, failed) to manage its display and troubleshoot issues.
Bridge.advertisement.bannerState
Possible values: Loading
, Shown
, Hidden
, Failed
.
// To track banner state changes, subscribe to the event
private void Start()
{
Bridge.advertisement.bannerStateChanged += OnBannerStateChanged;
}
private void OnBannerStateChanged(BannerState state)
{
Debug.Log(state);
}
Last updated