Skip to main content

Inventory.RemoveItem

Declaration#

public virtual void RemoveItem(string itemId, Int32 count)

Parameters#

NameDescription
itemIdId to remove
countCount to remove

Description#

Remove item from inventory

Usage#

using NullSave.GDTK.Inventory;using UnityEngine;
public class Example : MonoBehaviour{
    public void ExampleMethod(Inventory target)    {        target.RemoveItem(InventoryDatabase.instance.items[0].info.id, 1);    }
}

Declaration#

public virtual void RemoveItem(GDTKItem item, Int32 count)

Parameters#

NameDescription
itemItem to remove
countCount to remove

Description#

Remove item from inventory

Usage#

using NullSave.GDTK.Inventory;using UnityEngine;
public class CodeSample : MonoBehaviour{
    public void Example(Inventory target, GDTKItem other)    {        target.RemoveItem(other, 1);    }
}