Tricky Save/Load question

Alright, so I have very little understanding on how to save and load minor things such as a score or things of that sort. So, when it comes to something like saving/loading a player’s position, what objects are still in the scene, and so on, I am completely stumped on what to do.

Basically, I would like to create a checkpoint system that saves literally everything that is in your scene. Such things include:

  1. Position of player and other objects
  2. The existence of (or lack thereof) objects in the scene
  3. The variables of scripts/components and their values as well as whether or not they still exist

What I mean by existence is simply whether or not the thing is still in the scene or not.

As you can see, I have a lot to save/load in my game, and with as little knowledge for scripting in that area, I’m hoping I could get some help with this problem. Pseudo-scripts, links, or just flat out explanations all work! I just need something to get me pointed in the right direction.

What I’d do is to define a new class that contains all the fields that you need to save/load, and mark that class as [System.Serializable]. Then you can save and load that class to a file using the System.Runtime.Serialization BinaryFormatter.

There’s an example at https://unity3d.com/learn/tutorials/modules/beginner/live-training-archive/persistence-data-saving-loading