Latest

πŸ“² How to Integrate AdMob in Unity (Step-by-Step for Android in 2025)

πŸ’‘ Want to earn real money from your Unity mobile game? Learn how to Integrate AdMob in Unity or how to show banner, interstitial, and rewarded ads with Google AdMob in Unity.

AdMob is one of the most popular ad networks for monetising Android and iOS games. If you’ve built a mobile game in Unity, this is your chance to add ads and start earning β€” even with just 100+ users!

Let’s walk through the complete AdMob integration process in 2025.


🧰 What You’ll Need:

  • βœ… Unity installed (2021.3+ LTS preferred)
  • βœ… A working Android game project
  • βœ… Google AdMob account (https://apps.admob.com)
  • βœ… Android device for testing

βœ… Step 1: Create AdMob Account & App

  1. Go to https://apps.admob.com
  2. Click on Apps β†’ Add App
  3. Select Android β†’ β€œYes” or β€œNo” (if already published)
  4. Add App name, select category, click Add
  5. You’ll get an App ID (Copy it!)

βœ… Step 2: Import Google Mobile Ads SDK in Unity

  1. Download the Google Mobile Ads Unity Plugin from:
    πŸ‘‰ https://github.com/googleads/googleads-mobile-unity
  2. Import the .unitypackage into your project:
    • Go to Assets > Import Package > Custom Package
    • Select the downloaded file β†’ Click Import All
  3. Add the GoogleMobileAds namespace:
    using GoogleMobileAds.Api;
    

πŸ•ΉοΈ Unity vs Unreal vs Godot – Which is Best for Beginners in 2025?


βœ… Step 3: Initialize AdMob in Your Game

In your GameManager or any start scene script, add this in Start():

void Start()
{
    MobileAds.Initialize(initStatus => {
        Debug.Log("AdMob Initialized");
    });
}

You can also enable test ads for safe testing:

RequestConfiguration requestConfiguration = new RequestConfiguration
    .Builder()
    .SetTestDeviceIds(new List<string>() { "YOUR_DEVICE_ID" })
    .build();
MobileAds.SetRequestConfiguration(requestConfiguration);

βœ… Step 4: Show a Banner Ad

BannerView bannerView;

void RequestBanner()
{
    string adUnitId = "ca-app-pub-xxxxxxxxxxxxx/xxxxxxxxxxx"; // Replace with real ID
    bannerView = new BannerView(adUnitId, AdSize.Banner, AdPosition.Bottom);
    AdRequest request = new AdRequest.Builder().Build();
    bannerView.LoadAd(request);
}

Call RequestBanner(); after initialization.


βœ… Step 5: Show Interstitial Ad (Full Screen)

InterstitialAd interstitial;

void RequestInterstitial()
{
    string adUnitId = "ca-app-pub-xxxxxxxxxxxxx/xxxxxxxxxxx";
    interstitial = new InterstitialAd(adUnitId);

    AdRequest request = new AdRequest.Builder().Build();
    interstitial.LoadAd(request);

    interstitial.OnAdClosed += HandleOnAdClosed;
}

void ShowInterstitial()
{
    if (interstitial.IsLoaded())
    {
        interstitial.Show();
    }
}

βœ… Step 6: Add Rewarded Video Ads

RewardedAd rewardedAd;

void RequestRewardedAd()
{
    string adUnitId = "ca-app-pub-xxxxxxxxxxxxx/xxxxxxxxxxx";
    rewardedAd = new RewardedAd(adUnitId);

    AdRequest request = new AdRequest.Builder().Build();
    rewardedAd.LoadAd(request);

    rewardedAd.OnUserEarnedReward += HandleUserEarnedReward;
    rewardedAd.OnAdClosed += HandleOnAdClosed;
}

void ShowRewardedAd()
{
    if (rewardedAd.IsLoaded())
    {
        rewardedAd.Show();
    }
}

public void HandleUserEarnedReward(object sender, Reward args)
{
    Debug.Log("Rewarded! Give user coins or extra life.");
}

βœ… Step 7: Build Settings for Android

  1. Go to File > Build Settings > Android > Switch Platform
  2. Enable:
    • Internet permission in Player Settings > Publishing
    • Min API Level = 21 or higher
    • Target Architectures: ARMv7 + ARM64
  3. Export as .apk or .aab

πŸš€ Final Checklist Before Publishing

Item Status
AdMob App ID used βœ…
Real Ad Unit IDs added βœ…
Ads tested successfully βœ…
No test ads in release βœ…
Reward logic working βœ…

πŸ’Έ Bonus: How to Earn More with AdMob?

  • Use Interstitial ads on level complete
  • Show Rewarded ads for extra coins or continue
  • Keep banner ads on pause menu, game over
  • Use Unity Analytics to track which ads perform best
  • Avoid ad spam – keep UX clean

πŸ’¬ Final Thoughts

AdMob is one of the easiest and safest ways to monetise your Unity Android games. Once setup, you can start earning passively from every player.

Start with test ads, then switch to real ads after testing.


πŸ› οΈ Need Help?

πŸ‘‰ Download Free Unity + AdMob Starter Project
πŸ‘‰ Hire me to integrate AdMob into your game (β‚Ή999)
πŸ‘‰ Subscribe to my YouTube for Unity tutorials

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button