The Adjust Unity SDK enables you to measure attribution, events, and more in your Unity app. Follow the steps in this guide to set up your app to work with the Adjust SDK.
To use the Adjust SDK in your Unity app, you need to add it to your project. You can download the latest version from our GitHub releases page.
To import the Adjust SDK to your Unity project:
- Open the Unity Editor.
- Select Assets -> Import Package -> Custom Package .
- Select the downloaded SDK package.
The Adjust SDK contains a Unity prefab that includes a template game object and an
Adjust script. You can use this script to configure the SDK. To open the prefab in the Unity editor:
- Add the prefab from
Assets/Adjust/Adjust.prefabto your first scene.
- Open the prefab Inspector Menu .
The prefab menu contains editable fields that control the behavior of the Adjust SDK.
To set up the Adjust SDK, enter the following information:
Your App Token . See App settings for instructions on how to find your token.
Your Environment :
Your Log Level . This controls what logs you receive. See Set log level for more information.
The Adjust SDK starts when the app's
Awake event triggers by default. To override this behavior, check the START SDK MANUALLY option. This enables you to initialize the Adjust SDK by calling
Adjust.start() with your config instance as an argument.
Apps that target the Google Play Store must use the Google Advertising ID (
gps_adid) to identify devices. You need to add the
play-services-ads-identifier AAR to your project to access the
The App Set Identifier is a unique identifier that enables you to measure information from any of your apps that a user has installed on their device. All apps by the same developer share the same App Set ID, meaning you can gather meaningful insights from users across all your apps.
If you are using Proguard, add the following rules to your custom Proguard file.
The install referrer is a unique identifier which you can use to attribute an app install to a source. The Adjust SDK requires this information to perform attribution. There are two methods you can use to gather this information depending on which stores you target:
- Use the Google Play Referrer API.
- Use the Huawei Referrer API.
To complete the app build process, the Adjust Unity package performs custom post-build actions to ensure the Adjust SDK works properly in your app.
This process is performed by the
OnPostprocessBuild method in
AdjustEditor.cs. Output logs show up in the Unity IDE console output window.
You can use the Adjust SDK signature to sign all communications sent by the Adjust SDK. This enables Adjust’s servers to detect and reject any install activity that is not legitimate.
To get started with the Adjust SDK signature, contact your Technical Account Manager or email@example.com.
The Adjust SDK provides tools for testing and troubleshooting issues with your integration. To test your setup:
- Set your environment to Sandbox .
- Add a sandbox filter to your Adjust dashboard results.
- Set your log level to verbose .