Class IronSource
LevelPlay's API Access point
Implements
Inherited Members
Namespace: Global Namespace
Assembly: Unity.LevelPlay.dll
Syntax
public class IronSource : IronSourceIAgent
Properties
Agent
Returns a reference to the platform's LevelPlay API.
Declaration
public static IronSource Agent { get; }
Property Value
Type | Description |
---|---|
Iron |
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 |
---|---|---|
Waterfall |
waterfallConfiguration | The configuration for the given ad types waterfall. |
Ad |
adFormat | The AdFormat for which to configure the waterfall. |
clearRewardedVideoServerParams()
Clears custom parameters for server-to-server completion callbacks.
Declaration
public void clearRewardedVideoServerParams()
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 |
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 |
---|---|
Iron |
An IronSourcePlacement containing the placement infos |
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 |
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()
loadConsentViewWithType(string)
Loads the consent view.
Declaration
public void loadConsentViewWithType(string consentViewType)
Parameters
Type | Name | Description |
---|---|---|
string | consentViewType | View type for the consent popup |
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
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
setNetworkData(string, string)
Set custom network data.
Declaration
public void setNetworkData(string networkKey, string networkData)
Parameters
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 |
---|---|---|
Iron |
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 |
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()