Skip to content

Installing the Unity Package

Download

Download the latest version or, visit our releases archive.

Version Type Notes
2.10.0 General -
2.10.0 Static linkage Check our iOS section to know more

Unity Editor is NOT Supported

The Unity Editor is not supported at the moment. In order to test and debug the CMP you will need to run the project on a simulator or real device.

Install

Prerequisites

  • Android 5.0 (API 21), or higher, for the Minimum API Level and Android 12 (API 31) for the Target API Level
  • Java version 8 or 11 depending on the Unity Version
  • Kotlin 1.7 or higher
  • iOS 11 or higher

On Unity IDE

  1. Drag and drop Usercentrics.unitypackage into your Unity project. Alternatively, you can select the package from the menu Assets > Import Package > Custom Package
  2. If you have already imported ExternalDependencyManager for Unity in your project, you can deselect it in the pop-up, to keep your previous configuration. Import package window
  3. Click on "Import".
  4. Drag Usercentrics prefab into your Scene, this will represent the Game Object for our Banner.
  5. The name of this object should be Usercentrics.
  6. You are ready to start the SDK integration. 🚀

iOS Static Linkage Support

Since we use ExternalDependencyManager, the project output, when building for iOS, will be a CocoaPods workspace, which offers an option to Link frameworks statically.

In case this option makes sense for your game, you should use our static package release.

Troubleshooting

Unity Editor is NOT Supported

The Unity Editor is not supported at the moment. In order to test and debug the CMP you will need to run the project on a simulator or real device.

Supporting iOS & Xcode

Cocoapods must be installed for iOS builds to work, check their installation guide.

When opening the project built by Unity, you should always select the .xcworkspace file created by Cocoapods.

ExternalDependencyManager and Building

When using this plugin for the first time, a popup will appear asking if you want to enable "Android Auto-resolution", we highly recommend to enable, since it's natural for some Android libraries have conflicting dependencies. Enabling this "auto-resolution", the plugin will take care of everything for you.

Auto-resolution popup

Internet Access is Required

The Usercentrics SDK needs internet in order to initialize. Make sure you enable a required connection in your Android Player Settings. File > Build Settings > Android (selected) > Player Settings > Other Settings > Internet Access > Required

Java version

Make sure that you are using Java 8 or 11. File > Project Structure > SDK Location > Gradle Settings > Gradle JDK

Dependencies

When Android is selected as Build Platform, the dependency manager will ask you to download the dependencies that Usercentrics needs. We recommend enabling Android Auto-resolution to handle this. Make sure you have downloaded all Android Build Support Modules including OpenJDK.