docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    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.

    Inheritance
    object
    LevelPlay
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    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.

    LevelPlayAdFormat[] 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<LevelPlayInitError>

    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<LevelPlayConfiguration>
    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)