docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class LevelPlayRewardedAd

    Implements ILevelPlayRewardedAd to provide functionality for managing rewarded ads.

    Inheritance
    object
    LevelPlayRewardedAd
    Implements
    ILevelPlayRewardedAd
    IDisposable
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.Services.LevelPlay
    Assembly: Unity.LevelPlay.dll
    Syntax
    public 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()

    Dispose the rewarded ad

    Declaration
    public void Dispose()

    GetAdId()

    Gets the ad ID associated with this ad.

    Declaration
    public string GetAdId()
    Returns
    Type Description
    string

    The ID of the ad.

    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 user clicks on the Rewarded ad.

    Declaration
    public event Action<LevelPlayAdInfo> OnAdClicked
    Event Type
    Type Description
    Action<LevelPlayAdInfo>

    OnAdClosed

    Invoked when the Rewarded ad is closed.

    Declaration
    public event Action<LevelPlayAdInfo> OnAdClosed
    Event Type
    Type Description
    Action<LevelPlayAdInfo>

    OnAdDisplayFailed

    Invoked when the Rewarded ad fails to display.

    Declaration
    public event Action<LevelPlayAdDisplayInfoError> OnAdDisplayFailed
    Event Type
    Type Description
    Action<LevelPlayAdDisplayInfoError>

    OnAdDisplayed

    Invoked when the Rewarded ad is displayed.

    Declaration
    public event Action<LevelPlayAdInfo> OnAdDisplayed
    Event Type
    Type Description
    Action<LevelPlayAdInfo>

    OnAdInfoChanged

    Invoked when the Rewarded ad info is changed.

    Declaration
    public event Action<LevelPlayAdInfo> OnAdInfoChanged
    Event Type
    Type Description
    Action<LevelPlayAdInfo>

    OnAdLoadFailed

    Invoked when the Rewarded ad fails to load.

    Declaration
    public event Action<LevelPlayAdError> OnAdLoadFailed
    Event Type
    Type Description
    Action<LevelPlayAdError>

    OnAdLoaded

    Invoked when the Rewarded ad is loaded.

    Declaration
    public event Action<LevelPlayAdInfo> OnAdLoaded
    Event Type
    Type Description
    Action<LevelPlayAdInfo>

    OnAdRewarded

    Invoked when the Rewarded ad receives a reward.

    Declaration
    public event Action<LevelPlayAdInfo, LevelPlayReward> OnAdRewarded
    Event Type
    Type Description
    Action<LevelPlayAdInfo, LevelPlayReward>

    Implements

    ILevelPlayRewardedAd
    IDisposable
    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)