docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class IronSource

    LevelPlay's API Access point

    Inheritance
    object
    IronSource
    Implements
    IronSourceIAgent
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Global Namespace
    Assembly: Unity.LevelPlay.dll
    Syntax
    public class IronSource : IronSourceIAgent

    Fields

    UNITY_PLUGIN_VERSION

    Declaration
    [Obsolete("Please use the pluginVersion function", false)]
    public static string UNITY_PLUGIN_VERSION
    Field Value
    Type Description
    string

    Properties

    Agent

    Returns a reference to the platform's LevelPlay API.

    Declaration
    public static IronSource Agent { get; }
    Property Value
    Type Description
    IronSource

    Methods

    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 void SetPauseGame(bool pause)
    Parameters
    Type Name Description
    bool pause

    Is the game paused

    SetWaterfallConfiguration(WaterfallConfiguration, AdFormat)

    Allows publishers to set configurations for a waterfall of a given ad type.

    Declaration
    public void SetWaterfallConfiguration(WaterfallConfiguration waterfallConfiguration, AdFormat adFormat)
    Parameters
    Type Name Description
    WaterfallConfiguration waterfallConfiguration

    The configuration for the given ad types waterfall.

    AdFormat adFormat

    The AdFormat for which to configure the waterfall.

    clearRewardedVideoServerParams()

    Clears custom parameters for server-to-server completion callbacks.

    Declaration
    public void clearRewardedVideoServerParams()

    destroyBanner()

    Destroy a banner.

    Declaration
    public void destroyBanner()

    displayBanner()

    Show a banner.

    Declaration
    public void displayBanner()

    getAdvertiserId()

    Returns the advertiser ID.

    Declaration
    public string getAdvertiserId()
    Returns
    Type Description
    string

    Advertiser ID

    getConversionValue()

    Returns the conversion value or CV.

    Declaration
    public int? getConversionValue()
    Returns
    Type Description
    int?

    Conversion value

    getDeviceScreenWidth()

    Get Device Screen Width.

    Declaration
    public float getDeviceScreenWidth()
    Returns
    Type Description
    float

    getMaximalAdaptiveHeight(float)

    Get maximal Adaptive Height.

    Declaration
    public float getMaximalAdaptiveHeight(float width)
    Parameters
    Type Name Description
    float width

    The device width

    Returns
    Type Description
    float

    getPlacementInfo(string)

    Retrieve a placement by name.

    Declaration
    public IronSourcePlacement getPlacementInfo(string placementName)
    Parameters
    Type Name Description
    string placementName

    Placement's name

    Returns
    Type Description
    IronSourcePlacement

    An IronSourcePlacement containing the placement infos

    hideBanner()

    Hide a banner.

    Declaration
    public void hideBanner()

    init(string)

    Initialize the LevelPlay SDK.

    Declaration
    public void init(string appKey)
    Parameters
    Type Name Description
    string appKey

    Application key

    init(string, params string[])

    Initialize the LevelPlay SDK for specific ad unit types. For example IronSourceAdUnits.REWARDED_VIDEO would initialize for rewarded videos.

    Declaration
    public void init(string appKey, params string[] adUnits)
    Parameters
    Type Name Description
    string appKey

    Application key

    string[] adUnits

    List of ad unit types to initialize

    isBannerPlacementCapped(string)

    Determines if a banner placement is capped.

    Declaration
    public bool isBannerPlacementCapped(string placementName)
    Parameters
    Type Name Description
    string placementName

    Name of the placement

    Returns
    Type Description
    bool

    Is the banner placement capped

    isInterstitialPlacementCapped(string)

    Determines if an interstitial placement is capped.

    Declaration
    public bool isInterstitialPlacementCapped(string placementName)
    Parameters
    Type Name Description
    string placementName

    Name of the placement

    Returns
    Type Description
    bool

    Is the placement capped

    isInterstitialReady()

    Determines if an interstitial video is ready.

    Declaration
    public bool isInterstitialReady()
    Returns
    Type Description
    bool

    Is an interstitial video ready

    isRewardedVideoAvailable()

    Returns the availability of a rewarded video.

    Declaration
    public bool isRewardedVideoAvailable()
    Returns
    Type Description
    bool

    Is a rewarded video available

    isRewardedVideoPlacementCapped(string)

    Determines if a rewarded video placement is capped.

    Declaration
    public bool isRewardedVideoPlacementCapped(string placementName)
    Parameters
    Type Name Description
    string placementName

    Name of the placement

    Returns
    Type Description
    bool

    Is the placement capped

    launchTestSuite()

    Declaration
    public void launchTestSuite()

    loadBanner(IronSourceBannerSize, IronSourceBannerPosition)

    Load a banner.

    Declaration
    public void loadBanner(IronSourceBannerSize size, IronSourceBannerPosition position)
    Parameters
    Type Name Description
    IronSourceBannerSize size

    Standard size of the banner

    IronSourceBannerPosition position

    Anchored position of the banner

    loadBanner(IronSourceBannerSize, IronSourceBannerPosition, string)

    Load and show a banner for a specific placement.

    Declaration
    public void loadBanner(IronSourceBannerSize size, IronSourceBannerPosition position, string placementName)
    Parameters
    Type Name Description
    IronSourceBannerSize size

    Standard size of the banner

    IronSourceBannerPosition position

    Anchored position of the banner

    string placementName

    Name of the placement

    loadConsentViewWithType(string)

    Loads the consent view.

    Declaration
    public void loadConsentViewWithType(string consentViewType)
    Parameters
    Type Name Description
    string consentViewType

    View type for the consent popup

    loadInterstitial()

    Load an interstitial video

    Declaration
    public void loadInterstitial()

    loadRewardedVideo()

    Load a Rewarded video.

    Declaration
    public void loadRewardedVideo()

    onApplicationPause(bool)

    Notifies the LevelPlay SDK that the application has been paused or unpaused.

    Declaration
    public void onApplicationPause(bool pause)
    Parameters
    Type Name Description
    bool pause

    Is the application paused

    pluginVersion()

    LevelPlay plugin version.

    Declaration
    public static string pluginVersion()
    Returns
    Type Description
    string

    LevelPlay's version

    setAdRevenueData(string, Dictionary<string, string>)

    Set ILRD information

    Declaration
    public void setAdRevenueData(string dataSource, Dictionary<string, string> impressionData)
    Parameters
    Type Name Description
    string dataSource

    Source of the ILRD info

    Dictionary<string, string> impressionData

    Key-value pair list containing the ILRD data

    setAdaptersDebug(bool)

    Enables or disables adapters debug info.

    Declaration
    public void setAdaptersDebug(bool enabled)
    Parameters
    Type Name Description
    bool enabled

    Is adapters debug info enabled

    setConsent(bool)

    Set user's GDPR consent

    Declaration
    public void setConsent(bool consent)
    Parameters
    Type Name Description
    bool consent

    Is the user consenting

    setDynamicUserId(string)

    Sets a dynamic user ID that can be changed through the session and will be used in server to server rewarded ad callbacks. This parameter helps verify AdRewarded transactions and must be set before calling ShowRewardedVideo.

    Declaration
    public bool setDynamicUserId(string dynamicUserId)
    Parameters
    Type Name Description
    string dynamicUserId

    The ID to be set

    Returns
    Type Description
    bool

    Was the dynamic user ID set successfully

    setManualLoadRewardedVideo(bool)

    Toggles manual loading of rewarded videos.

    Declaration
    public void setManualLoadRewardedVideo(bool isOn)
    Parameters
    Type Name Description
    bool isOn

    Are rewarded videos loaded manually.

    setMetaData(string, string)

    Allows setting extra flags, for example "do_not_sell" to allow or disallow selling or sharing personal information.

    Declaration
    public void setMetaData(string key, string value)
    Parameters
    Type Name Description
    string key

    The flag to set

    string value

    the value for the flag

    setMetaData(string, params string[])

    Allows setting extra flags, for example "do_not_sell" to allow or disallow selling or sharing personal information.

    Declaration
    public void setMetaData(string key, params string[] values)
    Parameters
    Type Name Description
    string key

    The flag to set

    string[] values

    the values for the flag

    setNetworkData(string, string)

    Set custom network data.

    Declaration
    public void setNetworkData(string networkKey, string networkData)
    Parameters
    Type Name Description
    string networkKey

    The attribute key

    string networkData

    The attribute value

    setRewardedVideoServerParams(Dictionary<string, string>)

    Set custom parameters for server-to-server completion callbacks.

    Declaration
    public void setRewardedVideoServerParams(Dictionary<string, string> parameters)
    Parameters
    Type Name Description
    Dictionary<string, string> parameters

    Key-Value list of parameters

    setSegment(IronSourceSegment)

    Set the segment a user belongs to.

    Declaration
    public void setSegment(IronSourceSegment segment)
    Parameters
    Type Name Description
    IronSourceSegment segment

    Segment information for the current user

    setUnsupportedPlatform()

    Flags the current platform as unsupported for LevelPlay.

    Declaration
    public static void setUnsupportedPlatform()

    setUserId(string)

    Sets the user's identifier. If you’re serving the offerwall ad unit or using server-to-server callbacks to reward your users with ironSource SDK rewarded ad units, you must define a unique identifier for each user using this method. Set the UserID before the init request, to make sure you avoid any data loses, related to the user. Use a unique identifier, with up to 64 alphanumeric characters.

    Declaration
    public void setUserId(string userId)
    Parameters
    Type Name Description
    string userId

    User's ID

    shouldTrackNetworkState(bool)

    Enable or disable tracking of the network state. By default this is set to false.

    Declaration
    public void shouldTrackNetworkState(bool track)
    Parameters
    Type Name Description
    bool track

    Should the network state be tracked

    showConsentViewWithType(string)

    Show the consent view

    Declaration
    public void showConsentViewWithType(string consentViewType)
    Parameters
    Type Name Description
    string consentViewType

    View type for the consent popup

    showInterstitial()

    Show an interstitial video

    Declaration
    public void showInterstitial()

    showInterstitial(string)

    Show an interstitial video for a specific placement.

    Declaration
    public void showInterstitial(string placementName)
    Parameters
    Type Name Description
    string placementName

    Name of the placement

    showRewardedVideo()

    Show a rewarded video

    Declaration
    public void showRewardedVideo()

    showRewardedVideo(string)

    Show a rewarded video with a specific placement.

    Declaration
    public void showRewardedVideo(string placementName)
    Parameters
    Type Name Description
    string placementName

    Name of the placement

    unityVersion()

    Version of the Unity runtime used to play the content.

    Declaration
    public static string unityVersion()
    Returns
    Type Description
    string

    Version of the Unity runtime used to play the content

    validateIntegration()

    Runs the integration validation.

    Declaration
    public void validateIntegration()

    Implements

    IronSourceIAgent
    In This Article
    Back to top
    Copyright © 2024 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)