Can I use Unity Serializer in my games without paying royalties?
Yes. Unity Serializer is completely free to use. If you are making money out of your game you are encouraged to make a donation by clicking the button on the Unity Serializer home page.
Why do I have to capture the scene objects? What happens if I change the scene afterwards?
Capturing scene objects is just a way of initialising the Save Game Manager. The Save Game Manager holds a list of IDs for all of the game objects in the scene and keeps them constant. Once you’ve done it once you should never have to do it again, even if you change the scene later, so long as you don’t delete the object that has the Save Game Manager script attached.
How big are the saved files?
Of course this is a “how long is a piece of string?” question. The files are highly compressed and should just take a few kilobytes for even a fairly complicated scene. Unity Serializer uses 7zip compression to reduce file sizes.
Where is the data stored?
The data is stored in different places depending on the technique you use. If you use the complete Save/Load features of LevelSerializer then the data is stored in PlayerPrefs in a string key called _Save_Game_Data_. Checkpoints are stored based on the current player’s name and are held in keys in PlayerPrefs called [PlayerName]_RESUME_
You can store data anywhere you like if you use the base LevelSerializer.SerializeLevel and .LoadSavedLevel which return and take a string respectively.
Which script should I attach to my objects?
Basic use of the system only requires that you put a Prefab Identifier on any object that is created at runtime and a Store Information on anything else that you wish to save, or that is referenced by any other object (including as a parent of dynamically created objects). You can use Unique Identifier to save space in the saved file if the item only acts as a reference.
What does Unity Serializer save in my own scripts?
You can stop all public members being saved by adding [DoNotSerializePublic] to the class and then use [SerializeThis] to specify individual properties or fields.
How do I know when a level has been loaded?
All scripts that are involved in serialization can implement an OnDeserialized() function that is called when the loading process is complete.
I get a lot of “Problem Creating” messages in the log when loading, what’s wrong?
These messages mean the system couldn’t find your prefabs. If you load prefabs from Resources then make sure you have called LevelSerializer.AddPrefabPath to initialize each of the resources folders that contain prefabs. This call is not recursive and you must add all paths.