docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class ProductCollection

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

    Inheritance
    object
    ProductCollection
    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
    [Obsolete("This API is deprecated. Please upgrade to the new APIs introduced in IAP v5. For more information, visit the IAP manual: https://docs.unity.com/ugs/en-us/manual/iap/manual/upgrade-to-iap-v5", false)]
    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

    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)