Overview
Configure the package with your API Key when your game starts. This initializes the Encore SDK on the device: the native SDK on Android and iOS, and the web SDK on WebGL. A reward placement needs no purchase controller, so the API key is all it needs. AReduceChurn placement whose offers sell a product also needs an IEncorePurchaseController, passed to Configure.
Initialize Encore
CallEncore.Configure once, from the Unity main thread, before you identify the player or present anything. A MonoBehaviour in your first scene is a good place:
pk_your_api_key_here with your publishable Live key from the Dashboard under Settings → Project API Keys. Use the Test key for development builds.
Configure throws ArgumentException when the key is null or empty. The full contract is on Configure().
Log level
Pass aLogLevel to see Encore’s logs. The default is LogLevel.None:
None, Error, Warn, Info, and Debug. The package’s own messages go to the Unity log, and the native SDKs’ logs to Xcode or Android Studio. On WebGL they go to the browser console. Details: Configure() notes.
Threading
Call everyEncore method from the Unity main thread. Every callback, Task continuation, and event the package raises also arrives on the main thread, so you can use Unity objects in them directly.
Next steps
User management
Identify the player and set attributes
Present offers
Show the reward sheet at a moment the player earned