Class Monetization | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    Class Monetization

    Inheritance
    System.Object
    Monetization
    Namespace: UnityEngine.Monetization
    Syntax
    public static class Monetization

    Properties

    isInitialized

    Returns whether the monetization system is initialized successfully.

    Declaration
    public static bool isInitialized { get; }
    Property Value
    Type Description
    System.Boolean

    isSupported

    Returns if the current platform is supported by the monetization system.

    Declaration
    public static bool isSupported { get; }
    Property Value
    Type Description
    System.Boolean

    version

    Returns the current Unity Monetization version.

    Declaration
    public static string version { get; }
    Property Value
    Type Description
    System.String

    Methods

    CreateNativePromoAdapter(PromoAdPlacementContent)

    Declaration
    public static INativePromoAdapter CreateNativePromoAdapter(PromoAdPlacementContent placementContent)
    Parameters
    Type Name Description
    PromoAdPlacementContent placementContent
    Returns
    Type Description
    INativePromoAdapter

    GetPlacementContent(String)

    Declaration
    public static PlacementContent GetPlacementContent(string placementId)
    Parameters
    Type Name Description
    System.String placementId
    Returns
    Type Description
    PlacementContent

    Initialize(String, Boolean)

    Initialize the monetization system with specified gameId, testMode, IPurchasingAdapter

    Declaration
    public static void Initialize(string gameId, bool testMode)
    Parameters
    Type Name Description
    System.String gameId

    Game identifier.

    System.Boolean testMode

    Test mode.

    IsReady(String)

    Declaration
    public static bool IsReady(string placementId)
    Parameters
    Type Name Description
    System.String placementId
    Returns
    Type Description
    System.Boolean

    SetMetaData(MetaData)

    Declaration
    public static void SetMetaData(MetaData metaData)
    Parameters
    Type Name Description
    MetaData metaData

    SetPurchasingAdapter(IPurchasingAdapter)

    Declaration
    public static void SetPurchasingAdapter(IPurchasingAdapter adapter)
    Parameters
    Type Name Description
    IPurchasingAdapter adapter

    Events

    onPlacementContentReady

    Declaration
    public static event EventHandler<PlacementContentReadyEventArgs> onPlacementContentReady
    Event Type
    Type Description
    System.EventHandler<PlacementContentReadyEventArgs>

    onPlacementContentStateChange

    Declaration
    public static event EventHandler<PlacementContentStateChangeEventArgs> onPlacementContentStateChange
    Event Type
    Type Description
    System.EventHandler<PlacementContentStateChangeEventArgs>
    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