Save and Load Prefab and Mesh

Hi,

I’m planning to have a “Character” in the game which the player can modify their look by selecting various meshes and then later in the game the player can hire additional units. The units looks will also be randomly generated by picking a mesh from a collection.

I’ll need to save and load this data easily and i’m struggling to think of the best way to do this. At the moment I have a prefab for the “character” and when the player changes the look I activate and deactivate meshes which works fine.

When saving and loading will I need to keep that same prefab but save which mesh index the player chose or is there a way to make a new prefab from their choices and only save that?

I think your own suggestion is the best way to go; simply store the index numbers of which meshes should be active. I think you’ll have to serialize the index numbers to a file to make them persist.