The Ads Module is a core part of the EKStudioCore library (EKStudio.Monetization). It is not custom-written for this specific game project, but rather a reusable monetization framework integrated into the game template.
It manages Banners, Interstitials, and Rewarded Watch Ads, switching between production ad networks (AdMob, Unity Ads, LevelPlay) and a local editor simulator (Mock Ad Network).
AdvertisingSystem.cs - The static core manager responsible for initializing ad providers, caching/loading ads, verifying timing delays, showing ads, and executing callbacks.
AdRewardButton.cs - A generic, drop-in UI Button component to easily link a rewarded watch ad to any gameplay action with optional cooldowns and callbacks.
AdConfiguration.cs (ScriptableObject) - Stores configuration settings like selected providers, ad unit IDs, and timing/frequency variables.
MockAdNetwork.cs & AdMockController.cs - Local simulated ad networks that generate dummy overlay screens in the Unity Editor for seamless testing without SDKs.
Use AdvertisingSystem.ShowRewardBasedVideo to request a rewarded ad with a success callback:
using EKStudio.Monetization;
public void OnWatchAdToDoubleCoins()
{
// Optionally disable the button to prevent multiple clicks
doubleCoinsButton.interactable = false;
AdvertisingSystem.ShowRewardBasedVideo((bool success) =>
{
if (success)
{
// Give reward (e.g., Add coins, revive player, grant items)
SaveManager.Coins += levelReward;
UpdateUI();
}
else
{
// Re-enable button on failure/dismissal
doubleCoinsButton.interactable = true;
WarningManager.Instance.ShowWarning("Ad not available. Try again later.");
}
});
}

To add rewarded ads to custom UI buttons without writing code:
AdRewardButton component to a Unity UI Button.PlayerPrefs).statusTextTMP to automatically display "Watch Ad", "Loading...", or cooldown timers.