docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Interface IBannerAd

    Interface of an Banner Ad.

    Inherited Members
    IDisposable.Dispose()
    Namespace: Unity.Services.Mediation
    Assembly: Unity.Mediation.dll
    Syntax
    public interface IBannerAd : IDisposable

    Properties

    AdState

    Get the current state of the ad.

    Declaration
    AdState AdState { get; }
    Property Value
    Type Description
    AdState

    AdUnitId

    Get the ad unit id set during construction.

    Declaration
    string AdUnitId { get; }
    Property Value
    Type Description
    string

    Size

    Get the banner size set during construction.

    Declaration
    BannerAdSize Size { get; }
    Property Value
    Type Description
    BannerAdSize

    Methods

    LoadAsync()

    Loads the banner ad, and displays it when ready

    Declaration
    Task LoadAsync()
    Returns
    Type Description
    Task

    LoadAsync Task

    SetPosition(BannerAdAnchor, Vector2)

    Sets the position of the banner ad.

    Declaration
    void SetPosition(BannerAdAnchor anchor, Vector2 positionOffset = default)
    Parameters
    Type Name Description
    BannerAdAnchor anchor

    Anchor on which the banner position is based

    Vector2 positionOffset

    The X, Y coordinates offsets, relative to the anchor point

    Events

    OnClicked

    Event to be triggered by the adapter when the user clicks on the Ad.

    Declaration
    event EventHandler OnClicked
    Event Type
    Type Description
    EventHandler

    OnFailedLoad

    Event to be triggered by the adapter when an Ad fails to load.

    Declaration
    event EventHandler<LoadErrorEventArgs> OnFailedLoad
    Event Type
    Type Description
    EventHandler<LoadErrorEventArgs>

    OnLoaded

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

    Declaration
    event EventHandler OnLoaded
    Event Type
    Type Description
    EventHandler

    OnRefreshed

    Event to be triggered by the adapter when the Ad refreshes

    Declaration
    event EventHandler<LoadErrorEventArgs> OnRefreshed
    Event Type
    Type Description
    EventHandler<LoadErrorEventArgs>
    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)