docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method GetItems

    GetItems(ICollection<InventoryItem>)

    Fills the given list with all items in the manager. Note: this returns the current state of all items. To ensure that there are no invalid or duplicate entries, the list will always be cleared and 'recycled' (i.e. updated) with current data.

    Declaration
    public static int GetItems(ICollection<InventoryItem> target = null)
    Parameters
    Type Name Description
    ICollection<InventoryItem> target

    The collection to clear and fill with updated data.

    Returns
    Type Description
    int

    The number of items copied

    GetItems()

    Returns an array of all items in the manager.

    Declaration
    public static InventoryItem[] GetItems()
    Returns
    Type Description
    InventoryItem[]

    An array of all items in the manager.

    In This Article
    Back to top
    Copyright © 2024 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)