> For the complete documentation index, see [llms.txt](https://aatkit.gitbook.io/aatkit-unity-integration/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://aatkit.gitbook.io/aatkit-unity-integration/start/setup.md).

# Setup

Add AATKit to your Unity app

#### Import package

* Download and unpack [AATKit\_Unity.zip](https://gravite-sdk-releases.s3.eu-central-1.amazonaws.com/aatkit/unity/AATKit_Unity.zip).
* Open your project in Unity editor.
* Remove old AATKit plugin version if previously used (see [Updating plugin](#updating-the-plugin) section).
* Import the `AATKitUnity.unitypackage` file to your project.
* Make sure your project uses a custom `mainTemplate.gradle` file. To achieve this, enable **Custom Main Gradle Template** in Player Settings → Settings for Android → Publishing Settings.
* Make sure your project uses a custom `gradleTemplate.properties` file. To achieve this, enable **Custom Gradle Properties Template** in Player Settings → Settings for Android → Publishing Settings.
* **Unity 2022.3 or newer:** Make sure your project uses a custom `settingsTemplate.gradle` file. To achieve this, enable **Custom Gradle Settings Template** in Player Settings → Settings for Android → Publishing Settings.
* In the scene where you want to display ads, add the `AATKit` prefab object from the `Assets/AATKit/Prefabs` directory.
* If you don't want to include all ad networks in your application, see how to disable some via the [AATKitSettings](/aatkit-unity-integration/other/aatkitsettings-asset.md) asset.

***

#### Google App ID

Google requires your app's Google App ID to be declared in your project. **This step is mandatory** — without it, your app will crash at launch.

To obtain your Google App ID, please contact our [support](mailto:support@gravite.net).

**Android**

Add your Google App ID to the `AndroidManifest.xml` file. To include a custom manifest in your Unity project, enable **Custom Main Manifest** in Player Settings → Settings for Android → Publishing Settings.

Then add the following inside the `<application>` tag:

```xml
<meta-data
    android:name="com.google.android.gms.ads.APPLICATION_ID"
    android:value="ca-app-pub-XXXXXXXXXXXXXXXX~XXXXXXXXXX"/>
```

See also: [Google documentation for Android](https://developers.google.com/admob/android/quick-start#import_the_mobile_ads_sdk).

**iOS**

The easiest way to configure your Google App ID for iOS is directly through the [AATKit Settings](/aatkit-unity-integration/other/aatkitsettings-asset.md) panel in Unity — no need to edit `Info.plist` manually.

1. In the Unity Editor top bar, select **AATKit → Settings**.\
   This will open the AATKitSettings panel in the Inspector and create a settings asset at `Assets/Resources/AATKit/` if it doesn't exist yet.
2. In the Inspector, find the **GADApplicationIdentifier** field.
3. Paste your Google App ID (e.g. `ca-app-pub-XXXXXXXXXXXXXXXX~XXXXXXXXXX`) into the field.

AATKit will automatically inject the `GADApplicationIdentifier` value into your app's `Info.plist` during the build — no manual Xcode configuration required.

See also: [Google documentation for iOS](https://developers.google.com/admob/ios/quick-start#update_your_infoplist).

***

#### Android build

Once you have imported the plugin and configured the Google App ID, you are ready to build for Android. Go to File → Build Settings, select the **Android** platform, then click **Switch Platform**. Select the desired Build System and click **Build**.

#### iOS build

To generate your project for iOS, go to File → Build Settings, select the **iOS** platform, then click **Switch Platform** and **Build**. All required files will be added to your project automatically.

If the project fails to build, make sure the AATKit post-process script runs after all other scripts. Find the `AATKit/SDK/Editor/AATKitPostprocess.cs` file and change `[PostProcessBuild(999)]` to a higher number.

#### Updating the plugin

Before updating the plugin, delete the old `Assets/AATKit` folder to avoid issues with duplicated libraries.
