No matter how much I read up on this I can’t get it… I’m hoping to start implementing an automatic saving system into my game soon but want to clear this up as much as possible first.
The method I was leaning towards was json. But what is unity serialization and do I ever need to use it? If so what for? I’ve only used [System.Serializable] a few times to make things show in the Inspector and up until recently I thought that was the main use of it.
Serialization is the automatic process of transforming data structures or object states into a format that Unity can store and reconstruct later.
Saving data is simply writing data to a file.
Simplicity of serialization makes archiving and data recovery an automatic and easier for the user.
You can still save your data manually, by reading and writing files as you normally would, but it is a bit difficult with a complicated data structure.
Basically, saving a game is just writing the data to the hard drive.
JSON is a format to do just that, and the process of turning your game data into a JSON string is called “serialization”.
“Serialization” is the process by which you save your game if you use JSON.