Should I use ScriptableObjects?

I am creating a very simple RTS game. Each “structure” in my game (turrets, barracks etc) will have a couple of set properties:

  1. Structure Prefab - The 3D model that will appear on the map
  2. Grid Size - How many grid spaces this structure takes up
  3. Placement Prefab - The 3D model that will appear when the object is being placed
  4. etc…

Now I understand that I could use a base class for this, but I want to be able to manage my structures in a StructureManager class meaning I’d like to be able to create new structures via the inspector. My StructureManager class will have a fixed length array where I can add and remove structure objects and set the properties listed above.

It seems like using a ScriptableObject is the right thing to do here because I can create a structures asset bundle and edit each structures properties from the inspector. Unfortunately the Unity documentation is severely lacking when it comes to ScriptableObjects and Google isn’t turning up much… Can someone help point me in the right direction?

A ScriptableObject is like a MonoBehaviour that isn’t attached to a Game Object.

I think you could go either way. While it might make sense to be able to create new “structures” using a custom inspector, how will you use them after that? ie: how do the actual game objects in your scene know what kind of structure they are? You’ll have to attach it somehow, and at that point why not just use a MonoBehaviour?

Personally I would use a MonoBehavour and edit my different “structures” as prefabs. That way they can be instantiated directly into the scene.

I just realized this question is almost a year old. What solution did you end up using?