Inhereitance in the Inspector C#?

I am making an inventory for my game. I made a base class called Items.cs which inherits from monobehavior and added my vars. In my Inventory.cs script I inherit from Items and have a array. public Items item; When I start the game and add an element in the inspector it doesn’t show the vars it just shows element 0 - None(items). I want it to show my stats for the weapons like Damage, name, speed, ect… I’ve seen other questions about this like this one How can I make a custom inspector for this object in c# - Questions & Answers - Unity Discussions or this one Do Custom Inspectors Support Inheritance? - Questions & Answers - Unity Discussions but those don’t have enough detail for me to get them working. How do you get your base class vars to show as an array in the inspector through C#?

EDIT: I got it somewhat working with serialize. I had to make my base class (item.cs) NOT derive from anything and my derived class (Inventory.cs) inherit from monodevelop. But that’s the problem. What if I need to inherit from the base class (Item.cs), if I try to do that it says this “The class defined in the script file named ‘Inventory’ is not derived from MonoBehaviour or ScriptableObject!” and it doesn’t load. Also back to serializing its working for vars but not enums, anyone know why?

I’ll give this a shot… so you want Inventory to inherit from Item and you want Inventory to have an array of Item (its superclass?). Not sure why you would want to do this but this works:

public enum ItemClassType
{
	Weapon,
	Money,
	Armor
}

[Serializable]
public class Item : MonoBehaviour{
	public String name;
	public ItemClassType itemClass;
	public int damage;
}

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

}

This seems to work for me but has the odd effect of having Inventory with the attributes of one item plus an array of them. To create items just set the size of the array and you can view/change the items. You can also toggle between the item class types this way. Is this what you were trying to do?