🔵 Save Manager

A game save management system for Unity.




The Save Manager was an idea I had one afternoon after spending most of a day helping an friend with their saving troubles. I felt that, while the code was really quite simple, that some people may find this type of an asset useful, esspecially for beginners.


1.x

The development of the asset was rather simple and only took a few days to get fully working. I already had the code for saving and loading down, I just needed a way of making the save class easy to use. I decided that I would make an editor window for this. The window was reasonably easy to create, though some of the scaling took me a little while to get the hang of again. I had been a while since I had done any editor window programming. The hardest part of the whole asset was writing the code that would convert the user input into lines of code for the SaveData.cs class. I ended up making a method that would convert the lists which held the user values into a list of strings that were formatted correctly for the SaveData.cs class. Then just using File.WriteLine to write each line into the script one by one. This proved to work well and as long as the user didn’t make a typo or move the script it would work perfectly.


2.x

Version 2 which came out in early 2023 was a total re-write of the asset. The save system uses JSON now with scriptable objects to hold the data. With the scriptable object usage, users can reference their save data with direct inspector referencing if they’d like as well as via code. This version also has new features such as a save editor where you can edit the save data in the editor without opening the save data. A save profile system to load states of the save data for testing & support for WebGL & encryption.