I am creating a very simple RTS game. Each “structure” in my game (turrets, barracks etc) will have a couple of set properties:
- Structure Prefab - The 3D model that will appear on the map
- Grid Size - How many grid spaces this structure takes up
- Placement Prefab - The 3D model that will appear when the object is being placed
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?