Overview
The Encore Unity package lets your game present premium brand offers, real perks a brand funds to acquire customers, at the moments you choose. It is a C# API over the native iOS (EncoreKit) and Android (com.encorekit:encore) SDKs, and over the Encore web SDK in a WebGL build: the SDK draws the reward sheet and trigger components above your game, and runs the analytics.
You’ll add External Dependency Manager for Unity, which brings in the native SDKs at build time, then add the package.
Prerequisites
- Unity 2022.3 or later.
- Android: minimum API level 24, target API level 35.
- iOS: deployment target 15.0. Offers show on iOS 17 and later. On iOS 15 and 16,
ShowAsync()returns not presented with the reasonUnsupportedOS, and trigger components draw nothing. - WebGL: read the WebGL warning below first. The package bundles the Encore web SDK, so the WebGL template needs no change.
- Your API Key (starts with
pk_...) from the Encore Dashboard.
Don’t have an API key? Visit dashboard.encorekit.com to create an account, add your app, and receive your API key automatically.
Step 1: Add External Dependency Manager for Unity
The package lists the native SDKs inEditor/EncoreDependencies.xml. External Dependency Manager for Unity (EDM4U) reads that file and adds the native SDKs to your Android Gradle build and the CocoaPods file of your iOS build. Without EDM4U, the native SDKs are not in your build.
If your project doesn’t have EDM4U yet, add the OpenUPM registry and the package to Packages/manifest.json:
Step 2: Add the package
Pick a version from the Encore Unity SDK releases. In Unity, open Window → Package Manager, select + → Add package from git URL, and enter the URL with that version’s tag in place ofvX.Y.Z:
Packages/manifest.json:
com.encorekit.unity. It pins the native SDKs it was built against to exact versions. Version 2.5.0 pins com.encorekit:encore 2.5.0 on Android and EncoreKit 2.5.0 on iOS, and bundles @encorekit/web-sdk 2.5.0 for a WebGL build.
Step 3: Platform setup
Android: set Minimum API Level to 24 or higher under Project Settings → Player → Android → Other Settings. If your project has noAssets/Plugins/Android folder, create it. EDM4U writes its Gradle templates there and adds com.encorekit:encore to them when you build.
Without that folder, EDM4U falls back to a resolver that fails on Unity 6, and the build log shows
Resolution failed for com.encorekit:encore.EncoreKit pod to every target of the Xcode project Unity exports, including the app target, which must embed the framework.
Next steps
Configure the SDK
Initialize Encore with your API key
Build compatibility
Unity versions and billing packages, measured