Array in Arrays (Item info type)

Hi!

I’m making a simple game which I use some kind of shop mechanism in. I want to have icons, price and quantity. I’ve done this before but it was very messy in the inspector. So what I need is like an array of arrays of items. In there I need to store the name of the item, the icon of the item, the price and the quantity of the item.

Do someone know how to do this? If you do, please tell me!

Thanks

I am not sure I fully understand the point of an array of arrays but more likely an array of objects:

[System.Serializable]
public class Item{
   public Texture2D icon;
   public float price;
   public int quantity;
}

then in your class:

public class Inventory:MonoBehaviour{
   public Item[] items;
}

This will show up in your inspector and you can add value to the size and drag and drop texture and give values to price and quantity.