void OnGUI() { if (GUI.Button(new Rect(10, 10, 150, 100), "Add item")) { BasicItem item = new BasicItem("Test Item", "BasicIcon"); item.Amount = (ushort)Random.Range(1, 10); item.Durability = Random.Range(0.1f, 1.0f); mainContainer.AddItemAsASingleStack(item); } }
public void AddAnimal(BasicItem item) { mainContainer.AddItemAsASingleStack(item); }