- Home /
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?
Answer by RalliantoDeLaVega · Jul 24, 2015 at 05:21 PM
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.
Your answer
Follow this Question
Related Questions
Distribute terrain in zones 3 Answers
Getting item from List without a loop 1 Answer
Unity 3d C# saving and Loading Values 2 Answers
Problem when saving and loading 1 Answer