Unity LevelPlay
ironSource
Ad Monetization
Mobile Game Development
Game Engineering
iOS & Android

Unity Ad Monetization Guide using Unity LevelPlay: SDK Setup & Integration (Part 1)

5 min read
Eshan Naithani

In modern mobile game engineering, relying on a single ad network is no longer viable. Unity LevelPlay (formerly ironSource Mediation) is the industry-standard ad mediation platform used by top studios to run real-time bidding auctions across Google AdMob, AppLovin, Meta Audience Network, Mintegral, and Unity Ads.

Welcome to Part 1 of our 3-Part Unity LevelPlay Ad Monetization Masterclass:

In this first installment, we walk through installing the Unity LevelPlay SDK (com.unity.levelplay), initializing the SDK with your App Key, and writing production-ready C# code for Banner and Interstitial ad placements.


1. Why Choose Unity LevelPlay (ironSource)?

LevelPlay aggregates multiple ad networks into a single unified bidding auction. When a player reaches an ad placement, LevelPlay queries all demand sources simultaneously, serving the ad with the highest real-time eCPM bid.

Monetization ApproachFill Rate Tier 1 (US/UK)Fill Rate Tier 3 (IN/BR)Average eCPM Yield
Single Ad Network (e.g. Unity Ads)75% – 85%60% – 70%Baseline ($1.00x)
Unity LevelPlay Hybrid Mediation98% – 99.5%95% – 98%1.35x – 1.80x Higher Yield

2. Setting Up the Unity LevelPlay SDK

[!IMPORTANT] LevelPlay requires registering your app on the ironSource / LevelPlay Dashboard to generate your unique 8 to 12-character App Key for iOS and Android.

1. SDK Package Installation

Install the Unity LevelPlay SDK via the Unity Package Manager (com.unity.levelplay) or by importing the official .unitypackage from the Unity Asset Store / LevelPlay developer portal.

2. Android & iOS Manifest Requirements

  • iOS: Add SKAdNetwork IDs to your Info.plist (handled automatically by the LevelPlay iOS Post-Build Processor).
  • Android: Ensure mainTemplate.gradle specifies Google Play Services Ads dependency:
GROOVY
dependencies {
    implementation 'com.google.android.gms:play-services-ads-identifier:18.0.1'
}

3. Production C# LevelPlay Manager (Part 1: Setup & Interstitials)

Implement a robust singleton manager to initialize LevelPlay and handle Interstitial ad events cleanly.

CSHARP
using System;
using UnityEngine;
using com.unity3d.mediation;

public class LevelPlayAdManager : MonoBehaviour
{
    private static LevelPlayAdManager instance;
    public static LevelPlayAdManager Instance => instance;

    [Header("LevelPlay App Keys")]
    [SerializeField] private string androidAppKey = "1a2b3c4d";
    [SerializeField] private string iOSAppKey = "4d3c2b1a";

    [Header("Ad Unit IDs")]
    [SerializeField] private string interstitialAdUnitId = "Interstitial_Android";
    [SerializeField] private string bannerAdUnitId = "Banner_Android";

    private LevelPlayInterstitialAd interstitialAd;
    private LevelPlayBannerAd bannerAd;
    private string appKey;

    private void Awake()
    {
        if (instance != null && instance != this)
        {
            Destroy(gameObject);
            return;
        }
        instance = this;
        DontDestroyOnLoad(gameObject);
    }

    private void Start()
    {
        InitializeLevelPlay();
    }

    // =========================================================================
    // SECTION A: SDK INITIALIZATION
    // =========================================================================
    private void InitializeLevelPlay()
    {
#if UNITY_IOS
        appKey = iOSAppKey;
#elif UNITY_ANDROID
        appKey = androidAppKey;
#else
        appKey = androidAppKey;
#endif

        Debug.Log($"[LevelPlay] Initializing LevelPlay SDK with App Key: {appKey}");

        // Subscribe to Initialization Events
        LevelPlay.OnInitSuccess += OnLevelPlayInitSuccess;
        LevelPlay.OnInitFailed += OnLevelPlayInitFailed;

        // Initialize LevelPlay SDK
        LevelPlay.Init(appKey);
    }

    private void OnLevelPlayInitSuccess(LevelPlayConfiguration config)
    {
        Debug.Log("[LevelPlay Success] LevelPlay SDK Initialized Successfully!");
        
        // Setup Interstitial & Banner Ads
        CreateInterstitialAd();
        CreateBannerAd();
    }

    private void OnLevelPlayInitFailed(LevelPlayInitError error)
    {
        Debug.LogError($"[LevelPlay Error] SDK Initialization Failed: {error.ErrorCode} - {error.ErrorMessage}");
    }

    // =========================================================================
    // SECTION B: INTERSTITIAL ADS
    // =========================================================================
    private void CreateInterstitialAd()
    {
        interstitialAd = new LevelPlayInterstitialAd(interstitialAdUnitId);

        // Register Event Listeners
        interstitialAd.OnAdLoaded += (adInfo) => Debug.Log($"[LevelPlay] Interstitial Loaded: {adInfo.AdUnitId}");
        interstitialAd.OnAdLoadFailed += (error) => Debug.LogError($"[LevelPlay] Interstitial Load Failed: {error.ErrorMessage}");
        interstitialAd.OnAdDisplayed += (adInfo) => Debug.Log("[LevelPlay] Interstitial Displayed");
        interstitialAd.OnAdClosed += (adInfo) => 
        {
            Debug.Log("[LevelPlay] Interstitial Closed. Preloading next ad...");
            interstitialAd.LoadAd(); // Auto-preload next interstitial
        };

        // Load Initial Interstitial
        interstitialAd.LoadAd();
    }

    public void ShowInterstitialAd()
    {
        if (interstitialAd != null && interstitialAd.IsAdReady())
        {
            Debug.Log("[LevelPlay] Showing Interstitial Ad...");
            interstitialAd.ShowAd();
        }
        else
        {
            Debug.LogWarning("[LevelPlay Warning] Interstitial Ad is not ready to show.");
        }
    }

    // =========================================================================
    // SECTION C: BANNER ADS
    // =========================================================================
    private void CreateBannerAd()
    {
        bannerAd = new LevelPlayBannerAd(bannerAdUnitId, LevelPlayBannerSize.BANNER, LevelPlayBannerPosition.BOTTOM);
        bannerAd.OnAdLoaded += (adInfo) => Debug.Log("[LevelPlay] Banner Loaded Successfully.");
        bannerAd.OnAdLoadFailed += (error) => Debug.LogError($"[LevelPlay] Banner Load Failed: {error.ErrorMessage}");
    }

    public void ShowBanner()
    {
        if (bannerAd != null)
        {
            bannerAd.LoadAd();
            bannerAd.ShowAd();
        }
    }

    public void HideBanner()
    {
        if (bannerAd != null)
        {
            bannerAd.HideAd();
        }
    }
}

4. Part 1 Summary & Next Steps

In this first guide, we successfully integrated the Unity LevelPlay SDK and built a C# manager capable of preloading Interstitial ads and managing Banner display states.

[!TIP] Ready to unlock high-eCPM Rewarded Videos? Continue to Part 2!

👉 Continue to Part 2: Rewarded Video Ads, S2S Validation & Network Mediation Setup →


💡 Looking for a Custom Ad Monetization & LiveOps Strategy?

Struggling with low eCPMs, fill rates, or ad retention drops? I work directly with mobile game studios to architect high-yield ad waterfalls, IAP pricing, and LiveOps strategies:

  • High-eCPM Waterfall Architecture: Real-time bidding setup across AdMob, AppLovin, and LevelPlay.
  • Segmented Monetization: Tailored ad frequency caps for non-payers vs VIP players.
  • LiveOps & Retention Tuning: Balancing ad frequency to keep D30 retention strong.

👉 Book a Game Monetization & LiveOps Strategy Session or reach out directly to discuss your game's revenue goals.


🎮 Shipped Mobile Games & Official Store Profiles

Explore live commercial titles built with Unity and published across official app stores:


Planning to launch a mobile game or optimize your engineering budget? Check out our 2026 Mobile Game Development Cost Guide or book an engineering consultation.

Share this article

Looking to build a production-ready game?

See how I built Bird Sort Mania in 20 days using AI, or check out my full Mobile Games Portfolio to see my shipped titles on Android and iOS.

Join 5,000+ Game Developers

Get weekly insights on Unity performance optimization, AI gameplay architectures, and robust system design. No spam, just deep technical breakdowns.

Unsubscribe at any time. Your data is never shared.

Recommended Reading

More articles in Unity LevelPlay