Class LevelPlayRewardedAd
Implements ILevelPlayRewardedAd to provide functionality for managing rewarded ads.
Inherited Members
Namespace: com.unity3d.mediation
Assembly: Unity.LevelPlay.dll
Syntax
public sealed class LevelPlayRewardedAd : ILevelPlayRewardedAd, IDisposable
Constructors
LevelPlayRewardedAd(string)
Creates and Initializes a new instance of the LevelPlay Rewarded Ad.
Declaration
public LevelPlayRewardedAd(string adUnitId)
Parameters
Type | Name | Description |
---|---|---|
string | adUnitId | The unique ID for the ad unit. |
Properties
AdUnitId
Gets the ad unit id of the ad.
Declaration
public string AdUnitId { get; }
Property Value
Type | Description |
---|---|
string |
Methods
DestroyAd()
Destroys the Rewarded Ad.
Declaration
public void DestroyAd()
Dispose()
Declaration
public void Dispose()
IsAdReady()
Checks if the Rewarded ad is ready
Declaration
public bool IsAdReady()
Returns
Type | Description |
---|---|
bool | Returns true if the Rewarded ad is ready, returns false if not. |
IsPlacementCapped(string)
Checks if a given Placement Name is capped.
Declaration
public static bool IsPlacementCapped(string placementName)
Parameters
Type | Name | Description |
---|---|---|
string | placementName | Placement Name for the Rewarded Ad. |
Returns
Type | Description |
---|---|
bool | Returns true if placement is capped, returns false if not. |
LoadAd()
Loads the Rewarded Ad.
Declaration
public void LoadAd()
ShowAd(string)
Shows the Rewarded Ad.
Declaration
public void ShowAd(string placementName = null)
Parameters
Type | Name | Description |
---|---|---|
string | placementName | (Optional) Placement Name for the Rewarded Ad. |
Events
OnAdClicked
Invoked when the Rewarded ad when the user clicks on the ad.
Declaration
public event Action<LevelPlayAdInfo> OnAdClicked
Event Type
Type | Description |
---|---|
Action<Level |
OnAdClosed
Invoked when the Rewarded ad is closed.
Declaration
public event Action<LevelPlayAdInfo> OnAdClosed
Event Type
Type | Description |
---|---|
Action<Level |
OnAdDisplayFailed
Invoked when the Rewarded ad fails to display.
Declaration
public event Action<LevelPlayAdDisplayInfoError> OnAdDisplayFailed
Event Type
Type | Description |
---|---|
Action<Level |
OnAdDisplayed
Invoked when the Rewarded ad is displayed.
Declaration
public event Action<LevelPlayAdInfo> OnAdDisplayed
Event Type
Type | Description |
---|---|
Action<Level |
OnAdInfoChanged
Invoked when the Rewarded ad info is changed.
Declaration
public event Action<LevelPlayAdInfo> OnAdInfoChanged
Event Type
Type | Description |
---|---|
Action<Level |
OnAdLoadFailed
Invoked when the Rewarded ad fails to load.
Declaration
public event Action<LevelPlayAdError> OnAdLoadFailed
Event Type
Type | Description |
---|---|
Action<Level |
OnAdLoaded
Invoked when the Rewarded ad is loaded.
Declaration
public event Action<LevelPlayAdInfo> OnAdLoaded
Event Type
Type | Description |
---|---|
Action<Level |
OnAdRewarded
Invoked when the Rewarded ad receives reward.
Declaration
public event Action<LevelPlayAdInfo, LevelPlayReward> OnAdRewarded
Event Type
Type | Description |
---|---|
Action<Level |