docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Interface IReadOnlyProductCache

    Read only access to a product cache.

    Namespace: UnityEngine.Purchasing.Extension
    Assembly: Unity.Purchasing.dll
    Syntax
    public interface IReadOnlyProductCache

    Methods

    Find(string?)

    Gets a product by its product ID.

    Declaration
    Product? Find(string? productId)
    Parameters
    Type Name Description
    string productId

    Product ID to query by.

    Returns
    Type Description
    Product

    The matching product if found, otherwise returns null.

    FindOrDefault(string?)

    Find a matching product by its ID.

    Declaration
    Product FindOrDefault(string? productId)
    Parameters
    Type Name Description
    string productId

    Product ID to query by.

    Returns
    Type Description
    Product

    The matching product if found, otherwise returns an Unknown Product.

    GetProducts()

    Get all products currently in the cache.

    Declaration
    ReadOnlyObservableCollection<Product> GetProducts()
    Returns
    Type Description
    ReadOnlyObservableCollection<Product>
    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)