Interface IUnityAdsListener | Advertisement | 3.4.9
docs.unity3d.com
    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 © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023