docs.unity3d.com
    Show / Hide Table of Contents

    Class RewardedAd

    Class to be instantiated in order to show a Rewarded Ad.

    Inheritance
    Object
    RewardedAd
    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

    Gets the state of the RewardedAd.
    Declaration
    public AdState AdState { get; }
    Property Value
    Type Description
    AdState
    Implements
    IRewardedAd.AdState

    AdUnitId

    Gets the id of the ad unit.
    Declaration
    public string AdUnitId { get; }
    Property Value
    Type Description
    String
    Implements
    IRewardedAd.AdUnitId

    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
    IRewardedAd.Load()

    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
    IRewardedAd.Show(RewardedAdShowOptions)

    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
    IRewardedAd.OnClicked

    OnClosed

    Event to be triggered by the adapter when the RewardedAd is closed.

    Declaration
    public event EventHandler OnClosed
    Event Type
    Type Description
    EventHandler
    Implements
    IRewardedAd.OnClosed

    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
    IRewardedAd.OnFailedLoad

    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
    IRewardedAd.OnFailedShow

    OnLoaded

    Event to be triggered by the adapter when an Ad is loaded.

    Declaration
    public event EventHandler OnLoaded
    Event Type
    Type Description
    EventHandler
    Implements
    IRewardedAd.OnLoaded

    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
    IRewardedAd.OnShowed

    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>
    Implements
    IRewardedAd.OnUserRewarded
    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023