I need help to get some structure for my save and load.
I am making a city builder, so I have Buildings thats need to be saved.
Each building has a lot of static Data, for example
However it also has a lot of dynamic Data, for example
My current structure looks like this:
On each Building
GameObject I keep a reference to a
ScriptableObject that stores all the static data.
I also store a reference to an
Object that stores all the dynamic data.
This means I need 2 classes for storing Building data, which I already don't like (
When I Save/Load my game I only need to store the Dynamic data, so for saving I just save the
For Loading I load the
instantiate a Building
GameObject that is associated with it, then the
GameObject has the reference to the
While this works, I would prefer to have a structure where I only have a single class for
BuildingData, but I also don't want to lose the power of a
ScriptableObject where I can reference other Prefabs etc.
I need some help with this logic.