docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class LevelPlayBannerAd

    Implements ILevelPlayBannerAd to provide functionality for managing banner ads.

    Inheritance
    object
    LevelPlayBannerAd
    Implements
    ILevelPlayBannerAd
    IDisposable
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: com.unity3d.mediation
    Assembly: Unity.LevelPlay.dll
    Syntax
    public sealed class LevelPlayBannerAd : ILevelPlayBannerAd, IDisposable

    Constructors

    LevelPlayBannerAd(string, LevelPlayAdSize, LevelPlayBannerPosition, string, bool)

    Initializes a new instance of the LevelPlayBannerAd with specified ad properties.

    Declaration
    public LevelPlayBannerAd(string adUnitId, LevelPlayAdSize size = null, LevelPlayBannerPosition position = LevelPlayBannerPosition.BottomCenter, string placementName = null, bool displayOnLoad = true)
    Parameters
    Type Name Description
    string adUnitId

    The unique ID for the ad unit.

    LevelPlayAdSize size

    Size of the banner ad. Defaults to BANNER if null.

    LevelPlayBannerPosition position

    Position on the screen where the ad will be displayed. Defaults to BottomCenter if not specified.

    string placementName

    Optional name used for reporting and targeting. This parameter is optional and can be null.

    bool displayOnLoad

    Determines whether the ad should be displayed immediately after loading. Defaults to true.

    Methods

    DestroyAd()

    Destroys the banner ad and releases resources.

    Declaration
    public void DestroyAd()

    Dispose()

    Declaration
    public void Dispose()

    GetAdSize()

    Retrieves the size of the ad.

    Declaration
    public LevelPlayAdSize GetAdSize()
    Returns
    Type Description
    LevelPlayAdSize

    GetAdUnitId()

    Gets the ad unit ID associated with this ad.

    Declaration
    public string GetAdUnitId()
    Returns
    Type Description
    string

    GetPlacementName()

    Retrieves the placement name associated with this ad.

    Declaration
    public string GetPlacementName()
    Returns
    Type Description
    string

    GetPosition()

    Retrieves the position of the banner ad.

    Declaration
    public LevelPlayBannerPosition GetPosition()
    Returns
    Type Description
    LevelPlayBannerPosition

    HideAd()

    Hides the banner ad from the user.

    Declaration
    public void HideAd()

    LoadAd()

    Loads the banner ad.

    Declaration
    public void LoadAd()

    PauseAutoRefresh()

    Pauses the auto-refreshing of the banner ad.

    Declaration
    public void PauseAutoRefresh()

    ResumeAutoRefresh()

    Resumes the auto-refreshing of the banner ad that was previously paused.

    Declaration
    public void ResumeAutoRefresh()

    ShowAd()

    Displays the banner ad to the user.

    Declaration
    public void ShowAd()

    Events

    OnAdClicked

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

    OnAdCollapsed

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

    OnAdDisplayFailed

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

    OnAdDisplayed

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

    OnAdExpanded

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

    OnAdLeftApplication

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

    OnAdLoadFailed

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

    OnAdLoaded

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

    Implements

    ILevelPlayBannerAd
    IDisposable
    In This Article
    Back to top
    Copyright © 2024 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)