Should I work with scriptable objects like that?

I’m currently working on editor windows (with Odin) and trying to make everything configurable from the editor.
I am trying to build up a structure where all stuff is configurable in the editor.


For example:
A spaceship is built up by Attributes, Equipment, Cargospace (holding commodities) etc.
I have built a scriptable object for the type “spaceship” as “spaceshipData”. It represents different kinds of spaceships.
With that I can have a gameobject, drop a spaceshipData SO on it and that decides what “kind” of spaceship it is and what “stuff” it has like attributes etc.


Now comes the more difficult part.
I have for example cargospace. A ship (MonoBehaviour) can have a public Cargospace commodityCargospace = new Cargospace();
The cargospace has a size attribute and a list of commodities it holds.

public float size = 10.0f;
public List<Commodity> storedCommodities;

The commodity is a monobehaviour like ship and there are SO’s for each type of commodity there is (like AlienArtifacts or Minerals)


To configure the spaceship in editor to have stuff already in the cargospace I would need monobehaviours using the commodity SO.
That would mean I would need a copy of each commodity SO as a prefab with the SO attached so I’m able to set it in the array in the editor.
Thats not what I want because that would be pretty redundant.
How can I achieve the same thing without having a prefab for every commodity SO?


I hope it is understandable what I want, it’s kinda difficult to explain.
Don’t hesitate to ask for clarification please.

Thanks in advance!

Current solution

Changed storedCommodities to a Dictionary where CommodityData is the SO and the float determines the quantity stored.

Future problems arise

This will work for now but im sure I will tap into the same issue later.
What if I would like to not only have a float for the quantity. For example there could be degrading commodities that lose weight over time.
Weight is currently stored in the SO because it is not variable.