docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class SimpleCatalogProvider

    A simple implementation of IBaseCatalogProvider that uses a delegate to fetch product definitions. This provider wraps a function delegate to provide product catalog functionality in a straightforward manner.

    Inheritance
    object
    SimpleCatalogProvider
    Implements
    IBaseCatalogProvider
    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: Unity.Purchasing.dll
    Syntax
    public class SimpleCatalogProvider : IBaseCatalogProvider

    Constructors

    SimpleCatalogProvider(Action<Action<List<ProductDefinition>>>)

    Initializes a new instance of the SimpleCatalogProvider with a function delegate for fetching products.

    Declaration
    public SimpleCatalogProvider(Action<Action<List<ProductDefinition>>> func)
    Parameters
    Type Name Description
    Action<Action<List<ProductDefinition>>> func

    A function delegate that takes a callback as parameter and is responsible for fetching product definitions. The delegate should invoke the provided callback with the retrieved list of product definitions. Can be null, in which case FetchProducts will not perform any operation.

    Methods

    FetchProducts(Action<List<ProductDefinition>>)

    Fetches product definitions by invoking the configured function delegate.

    Declaration
    public void FetchProducts(Action<List<ProductDefinition>> callback)
    Parameters
    Type Name Description
    Action<List<ProductDefinition>> callback

    A callback function that will be invoked with the list of product definitions. The callback receives a List<T> containing the fetched products. If the internal function delegate is null, the callback will not be invoked.

    Implements

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