Scene Save/Load System: Binary Serialization Questions

Hi guys!

I’m want to create a save/load system for all non-static gameobjects in the scene.

For example: In TES you enter in level and move some items/kill some NPC/loot chests etc, then you leave this place. And if you return on this level, all your acts (items, dead bodies, quest objects) will remain on the same places.

i want to implement it by binary serialization. Here is the question:

What is the best way to get variables, lists and enum-states from components?
In tutorials recommends to use “reflect” classes: they are not inherited from MonoBehaviour and they stores all variables of components that i need to save. Is there another way? :slight_smile:

Thanks for help!

If this is one of the tutorials you’ve watched, that is basically the best way to save and load game data.

You can take a look at my SerializeHelper asset I have created specifically to help people understand serialization and loading/saving data. Available for free here:

Yep, I watched this lesson :slight_smile: But this lesson explains basic concepts of binary serialization

Thanks, Cherno! I will try to analyze your implementation of this feature!