Class LevelPlay
Manages initialization and basic operations of the LevelPlay SDK. This class provides methods to initialize the SDK and handles global events for initialization success and failure.
Inherited Members
Namespace: com.unity3d.mediation
Assembly: Unity.LevelPlay.dll
Syntax
public class LevelPlay
Methods
Init(string, string, LevelPlayAdFormat[])
Initializes the LevelPlay SDK with the specified app key and optional user ID and ad format list.
Declaration
public static void Init(string appKey, string userId = null, LevelPlayAdFormat[] adFormats = null)
Parameters
Type | Name | Description |
---|---|---|
string | appKey | The application key for the SDK. |
string | userId | Optional user identifier for use within the SDK. |
Level |
adFormats | Optional array of ad formats to initialize. |
SetPauseGame(bool)
When setting your PauseGame status to true, all your Unity 3D game activities will be paused (Except the ad callbacks). The game activity will be resumed automatically when the ad is closed. You should call the setPauseGame once in your session, before or after initializing the ironSource SDK, as it affects all ads (Rewarded Video and Interstitial ads) in the session.
Declaration
public static void SetPauseGame(bool pause)
Parameters
Type | Name | Description |
---|---|---|
bool | pause | Is the game paused |
Events
OnInitFailed
Adds or removes event handlers for the SDK initialization failure event. Ensures that the same handler cannot be added multiple times.
Declaration
public static event Action<LevelPlayInitError> OnInitFailed
Event Type
Type | Description |
---|---|
Action<Level |
OnInitSuccess
Adds or removes event handlers for the SDK initialization success event. Ensures that the same handler cannot be added multiple times.
Declaration
public static event Action<LevelPlayConfiguration> OnInitSuccess
Event Type
Type | Description |
---|---|
Action<Level |