docs.unity3d.com
    Show / Hide Table of Contents

    Class FakeUDPExtension

    Mock implementation of the interface for UDP purchasing extensions.

    Inheritance
    Object
    FakeUDPExtension
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: UnityEngine.Purchasing
    Syntax
    public class FakeUDPExtension : IUDPExtensions, IStoreExtension

    Methods

    EnableDebugLog(Boolean)

    Enable debug log for UDP.

    Declaration
    public void EnableDebugLog(bool enable)
    Parameters
    Type Name Description
    Boolean enable

    Whether or not the logging is to be enabled.

    Implements
    IUDPExtensions.EnableDebugLog(Boolean)

    GetLastInitializationError()

    Return the UDP initialization error.

    Declaration
    public string GetLastInitializationError()
    Returns
    Type Description
    String

    The error as a string.

    Implements
    IUDPExtensions.GetLastInitializationError()

    GetLastPurchaseError()

    Gets the last purchase error.

    Declaration
    public string GetLastPurchaseError()
    Returns
    Type Description
    String

    The error as a string.

    GetUserInfo()

    Some stores return user information after initialization.

    Declaration
    public object GetUserInfo()
    Returns
    Type Description
    Object

    UserInfo, which may be null

    Implements
    IUDPExtensions.GetUserInfo()

    RegisterPurchaseDeferredListener(Action<Product>)

    Called when a processing a purchase from UDP that is in the "OnPurchasePending" state.

    Declaration
    public void RegisterPurchaseDeferredListener(Action<Product> action)
    Parameters
    Type Name Description
    Action<Product> action

    Action will be called with the product that is in the "OnPurchasePending" state.

    Implements
    IUDPExtensions.RegisterPurchaseDeferredListener(Action<Product>)
    Back to top
    Terms of use
    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