Skip to content

Integration

This page shows you how to download, import, and configure the AppLovin MAX Unity Plugin.

Import the AppLovin MAX Unity Plugin

You may choose to import the AppLovin MAX Unity Plugin via the Unity Package Manager (UPM) or by importing a .unitypackage.

Unity Package Manager

The AppLovin MAX Unity Plugin requires specific registries and dependencies. The plugin installer automatically adds these registries and dependencies to Unity. Download the plugin installer by clicking the Download Installer button below:

Import the Installer Into Unity
  1. In Unity, select Assets > Import Package > Custom Package…
  2. Choose the installer file you downloaded.
  3. In the Import Unity Package dialog, click Import.

Import .unitypackage

Download the Latest Unity Plugin

Download the plugin manually by clicking the Download button below:

If you want to receive release updates, subscribe to the AppLovin MAX Unity Plugin GitHub repository.

Import the Plugin Into Unity

  1. In Unity, select Assets > Import Package > Custom Package….
  2. Choose the Unity Plugin file you downloaded.
  3. In the Import Unity Package dialog, click Import.

Requirements

  • Unity 2018.2 or later (Unity 2019.2 or later for Package Manager support).
  • For Android builds, the AppLovin MAX plugin requires that you enable Jetifier. To enable Jetifier, take the following steps:
    1. In Unity, select Assets > External Dependency Manager > Android Resolver > Settings.
    2. In the Android Resolver Settings dialog that appears, check Use Jetifier.
    3. Click OK.
  • For iOS builds:
  • Call all AppLovin MAX APIs on the main thread.

Add Your SDK Key

Add your AppLovin SDK Key in the AppLovin Integration Manager:

  1. In Unity, select AppLovin > Integration Manager. The AppLovin Integration Manager dialog appears.
  2. Under SDK Settings, type your SDK Key in the field labeled AppLovin SDK Key.
  3. If you want to enable the MAX Ad Review service, check Enable MAX Ad Review.

You can find your SDK key in the Account > General > Keys section of the AppLovin dashboard.

Initialize the SDK

Attach the OnSdkInitializedEvent event handler, then set the SDK key and initialize the SDK as soon as your app launches. The following code sample demonstrates this:

MaxSdkCallbacks.OnSdkInitializedEvent += (MaxSdk.SdkConfiguration sdkConfiguration) => {
// AppLovin SDK is initialized, start loading ads
};
MaxSdk.InitializeSdk();

Users have a better experience if mediated networks cache their ad assets. For this reason, always initialize the AppLovin SDK on startup. This gives mediated networks time to cache ads. This is especially important with video ads.

iOS 14 Support

In iOS 14, Apple introduced global privacy changes that you must comply with. This section explains how to comply with these changes and thereby avoid a material drop in revenue.

SKAdNetwork

The Unity Plugin automatically updates your app’s Info.plist with network-specific identifiers.

MAX Terms & Privacy Policy Flow

Implement the MAX Terms & Privacy Policy Flow to integrate compliance with the ATT framework and acceptance of your Terms of Service and Privacy Policy.

You must get consent from your users (in applicable jurisdictions) on behalf of AppLovin’s monetization partners. Then you must pass consent flag values to AppLovin. To learn how to do this, review the Privacy–Consent and Data APIs documentation.