how to save scene and load objects in 2d platformer

Hi,
I’m wondering, that how I could save and load objects in game in a 2d platformer, so that if the player collects an object(s), leave the scene and return back that scene later, the collected object(s) is(are) destroyed or deactivated.
What could be good way to do this?

Depends, if you need this information for only the current instance of the game (meaning, that after the player closes your game, this information is not relevant anymore), you can store some unique identifiers in some class, and put the game object on the DontDestroyOnLoad.
Then everytime you start/restart your scene, check if there’s anything in there waiting for you.

If you need this information to be persistent between the closing and opening the whole game, you will have to store it as such also.
Maybe something like this:
http://wiki.unity3d.com/index.php/ArrayPrefs2

Regards