docs.unity.cn
    Show / Hide Table of Contents

    Class ProductCollection

    Provides helper methods to retrieve products by store independent/store specific id.

    Inheritance
    Object
    ProductCollection
    Namespace: UnityEngine.Purchasing
    Syntax
    public class ProductCollection

    Properties

    all

    The array of all products

    Declaration
    public Product[] all { get; }
    Property Value
    Type Description
    Product[]

    set

    The hash set of all products

    Declaration
    public HashSet<Product> set { get; }
    Property Value
    Type Description
    HashSet<Product>

    Methods

    WithID(String)

    Gets a product matching an id

    Declaration
    public Product WithID(string id)
    Parameters
    Type Name Description
    String id

    The id of the desired product

    Returns
    Type Description
    Product

    The product matching the id, or null if not found

    WithStoreSpecificID(String)

    Gets a product matching a store-specific id

    Declaration
    public Product WithStoreSpecificID(string id)
    Parameters
    Type Name Description
    String id

    The store-specific id of the desired product

    Returns
    Type Description
    Product

    The product matching the id, or null if not found

    Back to top Copyright © 2020 Unity Technologies
    Generated by DocFX
    on 20 April 2021