Interface IronSourceIAgent
LevelPlay's API Access point
Namespace: Global Namespace
Assembly: Unity.LevelPlay.dll
Syntax
public interface IronSourceIAgent
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
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
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
void clearRewardedVideoServerParams()
getAdvertiserId()
Returns the advertiser ID.
Declaration
string getAdvertiserId()
Returns
Type | Description |
---|---|
string | Advertiser ID |
getConversionValue()
Returns the conversion value or CV.
Declaration
int? getConversionValue()
Returns
Type | Description |
---|---|
int? | Conversion value |
getDeviceScreenWidth()
Get Device Screen Width.
Declaration
float getDeviceScreenWidth()
Returns
Type | Description |
---|---|
float |
getMaximalAdaptiveHeight(float)
Get maximal Adaptive Height.
Declaration
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
IronSourcePlacement getPlacementInfo(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name | Placement's name |
Returns
Type | Description |
---|---|
Iron |
An IronSourcePlacement containing the placement infos |
init(string)
Initialize the LevelPlay SDK.
Declaration
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
void init(string appKey, params string[] adUnits)
Parameters
Type | Name | Description |
---|---|---|
string | appKey | Application key |
string[] | adUnits | List of ad unit types to initialize |
isInterstitialPlacementCapped(string)
Determines if an interstitial placement is capped.
Declaration
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
bool isInterstitialReady()
Returns
Type | Description |
---|---|
bool | Is an interstitial video ready |
isRewardedVideoAvailable()
Returns the availability of a rewarded video.
Declaration
bool isRewardedVideoAvailable()
Returns
Type | Description |
---|---|
bool | Is a rewarded video available |
isRewardedVideoPlacementCapped(string)
Determines if a rewarded video placement is capped.
Declaration
bool isRewardedVideoPlacementCapped(string placementName)
Parameters
Type | Name | Description |
---|---|---|
string | placementName | Name of the placement |
Returns
Type | Description |
---|---|
bool | Is the placement capped |
launchTestSuite()
Declaration
void launchTestSuite()
loadConsentViewWithType(string)
Loads the consent view.
Declaration
void loadConsentViewWithType(string consentViewType)
Parameters
Type | Name | Description |
---|---|---|
string | consentViewType | View type for the consent popup |
loadInterstitial()
Load an interstitial video
Declaration
void loadInterstitial()
loadRewardedVideo()
Load a Rewarded video.
Declaration
void loadRewardedVideo()
onApplicationPause(bool)
Notifies the LevelPlay SDK that the application has been paused or unpaused.
Declaration
void onApplicationPause(bool pause)
Parameters
Type | Name | Description |
---|---|---|
bool | pause | Is the application paused |
setAdRevenueData(string, Dictionary<string, string>)
Set ILRD information
Declaration
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
void setAdaptersDebug(bool enabled)
Parameters
Type | Name | Description |
---|---|---|
bool | enabled | Is adapters debug info enabled |
setConsent(bool)
Set user's GDPR consent
Declaration
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
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
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
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
void setMetaData(string key, params string[] values)
Parameters
setNetworkData(string, string)
Set custom network data.
Declaration
void setNetworkData(string networkKey, string networkData)
Parameters
setRewardedVideoServerParams(Dictionary<string, string>)
Set custom parameters for server-to-server completion callbacks.
Declaration
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
void setSegment(IronSourceSegment segment)
Parameters
Type | Name | Description |
---|---|---|
Iron |
segment | Segment information for the current user |
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
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
void shouldTrackNetworkState(bool track)
Parameters
Type | Name | Description |
---|---|---|
bool | track | Should the network state be tracked |
showConsentViewWithType(string)
Show the consent view
Declaration
void showConsentViewWithType(string consentViewType)
Parameters
Type | Name | Description |
---|---|---|
string | consentViewType | View type for the consent popup |
showInterstitial()
Show an interstitial video
Declaration
void showInterstitial()
showInterstitial(string)
Show an interstitial video for a specific placement.
Declaration
void showInterstitial(string placementName)
Parameters
Type | Name | Description |
---|---|---|
string | placementName | Name of the placement |
showRewardedVideo()
Show a rewarded video
Declaration
void showRewardedVideo()
showRewardedVideo(string)
Show a rewarded video with a specific placement.
Declaration
void showRewardedVideo(string placementName)
Parameters
Type | Name | Description |
---|---|---|
string | placementName | Name of the placement |
validateIntegration()
Runs the integration validation.
Declaration
void validateIntegration()