Inventory and scriptable object items - please point me in the right direction

Quick question (at least, I hope it’s quick):

This is my first time using scriptable objects, so I’m new to this stuff.

I have a BaseItem : ScriptableObject script.

Then I have a Weapons: BaseItem script, a QuestItems : BaseItem script, etc., all with BaseItem info and also some unique information.

Now, when populating the inventory, I’ve watched video upon video. I like the one presented in Unity’s Adventure Game Tutorial, but it’s set up for only populating the inventory list with the BaseItem. How do I get a master inventory list controller that’ll add any kind of item? Do I need to go a whole different route? (If so, please point me in the right direction.)
The simplified inventory from the Adventure Game tutorial that I was trying to adapt:
(note: using C#)

public class Inventory: MonoBehaviour {

    public const int numItemSlots = 4;

    public Image[] itemImages = new Image[numItemSlots];
    public BaseItem[] items = new BaseItem[numItemSlots];

    public void AddItem(BaseItem itemToAdd)
        for(int i = 0; i < items.Length; i++)
            if(items *== null)*

items = itemToAdd;
itemImages*.sprite = itemToAdd.sprite;*
itemImages*.enabled = true;*

I forgot to accept the answer, so I’ll try to do that now.

Turns out the principle I needed to learn about was “casting,” which is what eses was trying to point me towards when he did “var apple = item as Apple;”
It took me a little while to figure out but you can save your item into an array of AllItems, then “cast” it back out as whatever it is, ie, item as weapon, item as armor, etc., and all the relevant data will be preserved! Pretty cool.
I ended up learning about Interfaces too and used an Interface to implement it. Really really cool stuff to learn.
Thank you eses for giving the right answer even though it took me longer to figure out what you were talking about!
Cheers, I’m going to try to mark this as answered. :slight_smile: