- Home /
How to create a save & load system with: System.Serializable ???
I looked for several tutorials, but I did not find one that explained how to save ALL GameObjects of a scene (position, condition, variables, etc.). I think it's possible to do this with System.Serializable, however I do not know how to use it, please recommend tutorials on how to use it.
I don't see how System.Serializable can be used to save a scen like you describe. It doesn't matter if a class if marked as serializable if the BinaryFormatter doesn't know how to serialize a Type. These are two entirely different things.
You might want to take a look at my free Unity Save Load Utility.
Do you want to make a Game Save/Load feature? If so, you don't want to save everything, you want to save/restore "states", not complete scene. It all depends on your game mechanics and architecture.
Have a look at ScriptableObject, if what you want is to serialise data structure within Unity.
Answer by RobAnthem · Dec 26, 2016 at 06:14 PM
The best practices are to save things like Quest progress, Position, Levels, Inventory info, etc. Saving only the data you need to "repaint" the scene. Your main menu should handle the initial loading check. Unity ONLY uses System.Serializable for scriptableObjects. You need to use System.Serializable as a file formatter, Binary is your best option and works on all platforms. Go ahead and look into ths Formatting in Binary The most common practice is to dump EVERYTHING into a Dictionary and serialize the dictionary.
Your answer
Follow this Question
Related Questions
Not loading correct Scene/Level 1 Answer
Multiple Cars not working 1 Answer
Text on Enter Trigger / Text Delay 1 Answer
Distribute terrain in zones 3 Answers
Saving state instead of highscore 1 Answer