Skip to main content

InWorldContainer.AddItems

Declaration#

public virtual void AddItems(List<GDTKItem> items, Action<AddItemResult> callback)

Parameters#

NameDescription
itemsId of the item to add
callbackNumber of the item to add

Description#

Add a list of items item to the container

Usage#

using NullSave.GDTK.Inventory;using System.Linq;using UnityEngine;
public class Example : MonoBehaviour{
    public void ExampleMethod(InWorldContainer target, Inventory other)    {        target.AddItems(other.items.ToList(), ItemAddedCallback);    }
    private void ItemAddedCallback(AddItemResult result)    {        // This method is invoked for each individual item/stack added    }
}