Save System
A basic save system based on unity's JsonUtility
The save system is built on Unity's Json Utility which saves an object in a .json file. All the saves are located at Application.persistentDataPath which is located at C:\Users\<user>\AppData\LocalLow\<company name>
on widows.
Methods
Save
Saves the target object as .json file.
Load
Loads the target generic type from .json file with the given name
Load All
Loads all the target generic types from all .json files in the save path
Delete
Deletes .json file with the given name
Delete All
Deletes all .json files in the save path
Example
To start using the save system, first add the namespace FPSFramework to the class you want to save and load from, like this:
Now create a new class like this:
In Start(), call SaveSystem.Load(), and in OnApplicationQuit(), call SaveSystem.Save() inside the class you want to save and load from, like this:
Last updated