Create a list of BaseType where different supertypes are contained.
So I am busy with learning the whole IO thing, I want to write to and read from json and atm I have a solution for it. However I jsut found out about scriptable objects and want to create my ingame database with that instead of a gameobject in the scene that holds it. Take class BaseItem, it holds an id, name and value. I have a IWeapon interface that adds damage, type, primary attribute. I create a class called sword that inherits BaseItem and IWeapon. Now for the database I want to let it hold a list with every item in it from weapons to potions. After that is done it exports to json and every item has its own particular set of info, potions having different info than weapons. How can I create a list of every item possible and when I ask for say itemList[1] it shows all the info for that weapon but at itemList[2] is a potion and shows that info. Currently when I do this I can only acces the info from BaseItem and not from the superclasses.