Skip to content
HyperKit

Implement ad monetization

HyperKit covers all ad monetization needs out of the box, no additional configuration is necessary. Each ad format serves different purposes and should be implemented strategically throughout your game to maximize revenue while maintaining a positive user experience.

Below you will find code snippets for each ad format supported by HyperKit:

Banner ads are reloaded automatically, all you have to do is toggle the visibility.
Example code:

// To show the banner
HyperKit.Ads.ShowBanner();
// To hide the banner
HyperKit.Ads.HideBanner();

Interstitial ads are being loaded automatically, you just need to trigger the ad to be shown.

Example code:

using Services.Analytics.Models;
HyperKit.Ads.ShowInterstitial("interstitial-id",
new LevelContext("main", levelNumber, $"main_{levelNumber}"),
result =>
{
statusText.text = result
? "Interstitial was shown properly"
: "Interstitial was not shown";
});

Rewarded ads are being loaded automatically, you just need to trigger the ad to be shown.
It’s also a common practice to check for rewarded ads to be available before showing that option to the user.

using Services.Analytics.Models;
if (HyperKit.Ads.IsRewardedAdReady())
{
statusText.text = "Rewarded requested";
HyperKit.Ads.ShowRewardedAd("rewarded-id",
result =>
{
statusText.text = result
? "Rewarded OK"
: "Rewarded not shown";
},
new LevelContext("main", levelNumber, $"main_{levelNumber}"));
}
else
{
statusText.text = "Rewarded not ready";
}

MREC ads are reloaded automatically, all you have to do is toggle the visibility.
Example code:

// To show the MREC
HyperKit.Ads.ShowMrec();
// To hide the MREC
HyperKit.Ads.HideMrec();