Interface IUnityAdsListener | Advertisement | 3.6.1
docs.unity.cn
    Show / Hide Table of Contents

    Interface IUnityAdsListener

    An interface for handling various states of an ad. Implement this listener in your script to define logic for rewarded ads.

    The OnUnityAdsReady method handles logic for ad content being ready to display through a specified Placement.

    The OnUnityAdsDidError method handles logic for ad content failing to display because of an error.

    The OnUnityAdsDidStart method handles logic for the player triggering an ad to play.

    The OnUnityAdsDidFinish method handles logic for an ad finishing. Define conditional behavior for different finish states by accessing the ShowResult result from the listener. For more information, view documentation on implementing rewarded ads.

    Namespace: UnityEngine.Advertisements
    Syntax
    public interface IUnityAdsListener

    Methods

    OnUnityAdsDidError(String)

    Declaration
    void OnUnityAdsDidError(string message)
    Parameters
    Type Name Description
    String message

    OnUnityAdsDidFinish(String, ShowResult)

    Declaration
    void OnUnityAdsDidFinish(string placementId, ShowResult showResult)
    Parameters
    Type Name Description
    String placementId
    ShowResult showResult

    OnUnityAdsDidStart(String)

    Declaration
    void OnUnityAdsDidStart(string placementId)
    Parameters
    Type Name Description
    String placementId

    OnUnityAdsReady(String)

    Declaration
    void OnUnityAdsReady(string placementId)
    Parameters
    Type Name Description
    String placementId
    Back to top Copyright © 2020 Unity Technologies
    Generated by DocFX
    on 14 December 2020