Migrate to LevelPlay Init API
Transition to the LevelPlay initialization APIs to support multiple ad unit APIs, starting from SDK version 8.4.0.
Read time 1 minuteLast updated 4 hours ago
This guide explains how to transition to the LevelPlay initialization APIs to allow the use of multiple ad unit APIs.
Prerequisites
The minimum supported SDK is 8.4.0. You can download the latest SDK here.Initialize the SDK
To initialize the ironSource SDK, follow these steps:- Implement callbacks for initialization success and failure.
- Define the list of ad formats that require support from legacy ironSource API. This should include REWARDED.
- Call the LevelPlay init API using the appKey, ad formats, and user ID if relevant.
using com.unity3d.mediation; // Init the SDK when implementing the Multiple Ad Units API for Interstitial and Banner formats, with Rewarded using legacy APIs. LevelPlayAdFormat[] legacyAdFormats = new[] { LevelPlayAdFormat.REWARDED }; LevelPlay.OnInitSuccess += SdkInitializationCompletedEvent; LevelPlay.OnInitFailed += SdkInitializationFailedEvent; LevelPlay.Init(appKey,legacyAdFormats, "UserId");
LevelPlay Init Listeners
OnInitSuccess
OnInitFailed
Legacy | Ad Unit (new) | |
---|---|---|
Class | IronSource | LevelPlay |
API | init | Init |
API | setUserID | Should be set as part of the Init |
Callbacks | onInitializationComplete | OnInitSuccess |
- | OnInitFailed |