Multidimentional Array for Inventory style system in inspector.

Hey guys, I’m wanting to be able to create items from the inspector for my inventory. I’m not sure if I’ll need to make an editor script or what but am open to all suggestion.

Basically all items will have a number of stats each with their own values. What I’m wanting is the ability to add another item to this multi-dim array from the inspector, which would then let me fill out the inside values.

In the end, I would hopefully be able to access each item in the array with something like

itemList[0][name];
itemList[0][damage];

I could paste some code of 3 public arrays which is my public system, but I think you can get the picture XD

Appreciate any input

So you don’t really want to use a multi-dimensional array - you want to use an array of classes that means you won’t have to write any inspector code too - which might be seen as a bonus.

  using System;

  ...

  [Serializable]
  public class InventoryItem
  {
           public string Name;
           public float Damange;
           public bool someOtherProperty;
  }

  public List<InventoryItem> Items = new List<InventoryItem>();

Now you can use the inspector to create your list of items…