docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Interface IMediationService

    The interface for Mediation features.

    Namespace: Unity.Services.Mediation
    Assembly: Unity.Mediation.dll
    Syntax
    public interface IMediationService

    Properties

    DataPrivacy

    Access the Data Privacy API, to register the user's consent status.

    Declaration
    IDataPrivacy DataPrivacy { get; }
    Property Value
    Type Description
    IDataPrivacy

    ImpressionEventPublisher

    Access the Impression Event Publisher API, to receive events when impression events are fired from ad objects.

    Declaration
    IImpressionEventPublisher ImpressionEventPublisher { get; }
    Property Value
    Type Description
    IImpressionEventPublisher

    SdkVersion

    Native Mediation SDK version this mediation service is operating upon.

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

    Methods

    CreateBannerAd(string, BannerAdSize, BannerAdAnchor, Vector2)

    The Banner ads creator function.

    Declaration
    IBannerAd CreateBannerAd(string adUnitId, BannerAdSize size, BannerAdAnchor anchor = BannerAdAnchor.Default, Vector2 positionOffset = default)
    Parameters
    Type Name Description
    string adUnitId

    Unique Id for the Ad you want to show.

    BannerAdSize size

    Size of banner set to be constructed.

    BannerAdAnchor anchor

    Anchor on which the banner position is based

    Vector2 positionOffset

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

    Returns
    Type Description
    IBannerAd

    A new Banner Ad instance.

    CreateInterstitialAd(string)

    The Interstitial ads creator function.

    Declaration
    IInterstitialAd CreateInterstitialAd(string adUnitId)
    Parameters
    Type Name Description
    string adUnitId

    The Ad Unit Id for the ad unit you wish to show.

    Returns
    Type Description
    IInterstitialAd

    A new Interstitial Ad instance.

    CreateRewardedAd(string)

    The Rewarded ads creator function.

    Declaration
    IRewardedAd CreateRewardedAd(string adUnitId)
    Parameters
    Type Name Description
    string adUnitId

    The Ad Unit Id for the ad unit you wish to show.

    Returns
    Type Description
    IRewardedAd

    A new Rewarded Ad instance.

    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)