Integrate Vungle SDK for Unity (iOS and Android)

Vungle Unity plugin supports Unity 6000.0.66f2 or newer. Native Android and iOS SDKs are resolved automatically via External Dependency Manager (EDM4U).

Download the Vungle Plugin for Unity

Reference: Sample App

Refer to the sample scenes bundled with the package as you integrate: 

  • Package Samples (import via Package Manager > Vungle SDK by Liftoff > Samples)
  • Public plugin repository — full API and callback reference in the package README

Step 1. Install the Plugin

The plugin is distributed through two channels. The package contents are identical — pick one channel; do not install from both.

Option A — Unity Asset Store

  1. Add Vungle SDK by Liftoff to your assets on the Asset Store page.
  2. In Unity, open Window > Package Manager, switch to My Assets, select the package, and press Download, then Install.

Updates arrive through the same My Assets view when a new version is published.

Option B — npm (UPM scoped registry)

Open Edit > Project Settings > Package Manager > Scoped Registries and add:

  • Name: Liftoff Monetize
  • URL: https://registry.npmjs.com
  • Scope(s): io.liftoff

Then open Window > Package Manager, switch to My Registries, select Vungle SDK by Liftoff, and press Install.

Or edit Packages/manifest.json directly:

{
    "scopedRegistries": [
      {
        "name": "Liftoff Monetize",
        "url": "https://registry.npmjs.com",
        "scopes": ["io.liftoff"]
      }
    ],
    "dependencies": {
      "io.liftoff.vungleads": "7.1.2"
    }
  }

Unity shows a “Missing Signature” notice when installing packages not served from Unity's own registry. This is informational and expected.

Step 2. Confirm Native Dependencies Resolve

External Dependency Manager for Unity (EDM4U, com.unity.external-dependency-manager) is declared as a package dependency and installs automatically — no separate setup needed. At build time it resolves the native VungleAds SDK from Maven (Android) and CocoaPods (iOS). No files need to be copied into Assets/.

Step 3. Register Callbacks

Register your callbacks before calling Init. The SDK initializes asynchronously; load ads only after onInitializeSuccessEvent fires.

using VungleAds;

  VungleSdk.onInitializeSuccessEvent += OnSdkInitialized;
  VungleSdk.onInitializeFailedEvent  += err = Debug.LogError("Vungle init failed: " + err);

  void OnSdkInitialized()
  {
      Debug.Log("Vungle SDK ready");
      // Safe to load ads now
  }

Step 4. Initialize the SDK

VungleSdk.Init("YOUR_APP_ID");

Step 5. Add Code to Load and Play Ads

Load an Ad

The Load() call requires a placement ID. Register to the load callbacks to know whether the load succeeded.

using VungleAds;

  VungleInterstitial interstitialAd;

  void LoadInterstitial()
  {
      interstitialAd = new VungleInterstitial("YOUR_PLACEMENT_ID");

      interstitialAd.onLoadSuccess = () = Debug.Log("Interstitial loaded — ready to show");
      interstitialAd.onLoadFailed  = err = Debug.LogWarning("Load failed: " + err);
      interstitialAd.onDidClose    = () =
    {
        Debug.Log("Interstitial closed");
        interstitialAd = null;   // Object is invalid after close — always null out
    };

    interstitialAd.Load();
}

Play an Ad

The Show() call presents the ad. Call it only after onLoadSuccess has fired for that placement.

void ShowInterstitial()
{
    interstitialAd?.Show();
}

Other Ad Formats

Rewarded, Banner, and Native ads follow the same Load/Show (or Load/Attach) pattern shown above, with their own placement classes:

  • VungleRewarded — adds onDidRewardUser
  • VungleBannerView — Attach(x, y, width, height) or Attach(RectTransform) instead of Show()
  • VungleNative — renders only the main media; you render title/body/CTA yourself and mark clickable regions

A working sample scene is included for each format in the package's Samples. Full API and callback reference: package README at github.com/Vungle/Unity-Plugin.

Editor Behaviour

All SDK calls are no-ops in the Unity Editor and callbacks are never invoked. Guard ad code with #if (UNITY_IOS || UNITY_ANDROID) && !UNITY_EDITOR or test on a device.

Questions?

Need further assistance, feel free to reach out to us, we’re here to help!

Was this article helpful?