docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class FakeUDPExtension

    Mock implementation of the interface for UDP purchasing extensions.

    Inheritance
    object
    FakeUDPExtension
    Implements
    IUDPExtensions
    IStoreExtension
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.Purchasing
    Assembly: UnityEngine.Purchasing.Stores.dll
    Syntax
    public class FakeUDPExtension : IUDPExtensions, IStoreExtension

    Methods

    EnableDebugLog(bool)

    Enable debug log for UDP.

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

    Whether or not the logging is to be enabled.

    GetLastInitializationError()

    Return the UDP initialization error.

    Declaration
    public string GetLastInitializationError()
    Returns
    Type Description
    string

    The error as a string.

    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

    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
    IStoreExtension
    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)