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
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 the currently displayed banner ad when it is no longer needed.
Bridge.advertisement.HideBanner()
Monitor the state of the banner ad (loading, shown, hidden, failed) to manage its display and troubleshoot issues.
Bridge.advertisement.bannerState
// To track banner state changes, subscribe to the event
private void Start()
{
Bridge.advertisement.bannerStateChanged += OnBannerStateChanged;
}
private void OnBannerStateChanged(BannerState state)
{
Debug.Log(state);
}