Class RewardedAd
Class to be instantiated in order to show a Rewarded Ad.
Namespace: Unity.Services.Mediation
Syntax
public sealed class RewardedAd : object, IRewardedAd, IDisposable
Constructors
RewardedAd(String)
Constructor for managing a specific Rewarded Ad.
Declaration
public RewardedAd(string adUnitId)
Parameters
| Type | Name | Description |
|---|---|---|
| String | adUnitId | Unique Id for the Ad you want to show. |
Properties
AdState
RewardedAd.Declaration
public AdState AdState { get; }
Property Value
| Type | Description |
|---|---|
| AdState |
Implements
AdUnitId
Declaration
public string AdUnitId { get; }
Property Value
| Type | Description |
|---|---|
| String |
Implements
Methods
Dispose()
Dispose and release internal resources.
Declaration
public void Dispose()
Load()
Method to tell the Mediation SDK to load an Ad.
Declaration
public void Load()
Implements
Show(RewardedAdShowOptions)
Method to tell the Mediation SDK to show the loaded Ad.
Declaration
public void Show(RewardedAdShowOptions showOptions = null)
Parameters
| Type | Name | Description |
|---|---|---|
| RewardedAdShowOptions | showOptions |
Implements
Events
OnClicked
Event to be triggered by the adapter when the user clicks on the RewardedAd.
Declaration
public event EventHandler OnClicked
Event Type
| Type | Description |
|---|---|
| EventHandler |
Implements
OnClosed
Event to be triggered by the adapter when the RewardedAd is closed.
Declaration
public event EventHandler OnClosed
Event Type
| Type | Description |
|---|---|
| EventHandler |
Implements
OnFailedLoad
Event to be triggered by the adapter when an Ad fails to load.
Declaration
public event EventHandler<LoadErrorEventArgs> OnFailedLoad
Event Type
| Type | Description |
|---|---|
| EventHandler<LoadErrorEventArgs> |
Implements
OnFailedShow
Event to be triggered by the adapter when the RewardedAd has an error.
Declaration
public event EventHandler<ShowErrorEventArgs> OnFailedShow
Event Type
| Type | Description |
|---|---|
| EventHandler<ShowErrorEventArgs> |
Implements
OnLoaded
Event to be triggered by the adapter when an Ad is loaded.
Declaration
public event EventHandler OnLoaded
Event Type
| Type | Description |
|---|---|
| EventHandler |
Implements
OnShowed
Event to be triggered by the adapter when a Rewarded Ad is shown.
Declaration
public event EventHandler OnShowed
Event Type
| Type | Description |
|---|---|
| EventHandler |
Implements
OnUserRewarded
Event to be triggered by the adapter when a reward needs to be issued.
Declaration
public event EventHandler<RewardEventArgs> OnUserRewarded
Event Type
| Type | Description |
|---|---|
| EventHandler<RewardEventArgs> |