Banner Ads - API Reference

Available Methods


/// <summary>
/// Loads a banner with the given size and position
/// </summary>
/// <param name="size">The banner's size
/// <param name="position">The banner's position
/// <param name="placement">(optional) The ad placement
/// <param name="bannerBackgroundColor">(optional) The banner background color
void LoadBanner(BannerSize size, BannerPosition position, string placement = null, UnityEngine.Color bannerBackgroundColor = default);
 
/// <summary>
/// Show the latest loaded banner
/// </summary>
void ShowBanner(string placement = null);
 
/// <summary>
/// Hides the latest banner shown
/// </summary>
void HideBanner(string placement = null);
 
/// <summary>
/// Destroys the latest loaded banner
/// </summary>
void DestroyBanner(string placement = null);
 
/// <summary>
/// Returns the size of the banner on screen. Will return 0
/// if there is no banner, or if the feature is not supported. 
/// </summary>
int GetBannerHeight(string placementId = null);
 
/// <summary>
/// Sets the banner position.
/// </summary>
/// <param name="position">
/// <param name="placementId">
public void SetBannerPosition(BannerPosition position, string placementId = null);
 
/// <summary>
/// Sets the banner background color.
/// </summary>
/// <param name="color">
/// <param name="placementId">
public void SetBannerBackgroundColor(Color color, string placementId = null);

Callbacks


/// <summary>
/// Invoked when the user leaves the app
/// </summary>
HomaGames.HomaBelly.Events.onBannerAdLeftApplicationEvent += OnBannerAdLeftApplicationEvent;
 
/// <summary>
/// Notifies the presented screen has been dismissed
/// </summary>
HomaGames.HomaBelly.Events.onBannerAdScreenDismissedEvent += OnBannerAdScreenDismissedEvent;
 
/// <summary>
/// Notifies the presentation of a full screen content following user click
/// </summary>
HomaGames.HomaBelly.Events.onBannerAdScreenPresentedEvent += OnBannerAdScreenPresentedEvent;
 
/// <summary>
/// Invoked when end user clicks on the banner ad
/// </summary>
HomaGames.HomaBelly.Events.onBannerAdClickedEvent += OnBannerAdClickedEvent;
 
/// <summary>
/// Invoked when the banner loading process has failed.
/// @param description - string - contains information about the failure.
/// </summary>
HomaGames.HomaBelly.Events.onBannerAdLoadFailedEvent += OnBannerAdLoadFailedEvent;
 
/// <summary>
/// Invoked once the banner has loaded
/// </summary>
HomaGames.HomaBelly.Events.onBannerAdLoadedEvent += OnBannerAdLoadedEvent;