-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# UniversalSave | ||
|
||
- Need Unity version 2021+ | ||
- Easy use of saves | ||
- Support many data type (numeric types, unity vectors, Quaternion, Color, custom serializable structs and classes) | ||
- 2 different types save storage - PlayerPrefs or File System | ||
- 3 different serialization types - JsonUtility, JsonConvert, Binary | ||
|
||
## Installation | ||
|
||
- Import unitypackage from releases | ||
- If examples aren't needed, uncheck the folder "Examples" | ||
|
||
## Instruction | ||
|
||
Use the static class UniversalSave from namespace SG.GLobal.SaveSystem | ||
|
||
- UniversalSave.Save - save data by key | ||
- UniversalSave.Load - load data by key | ||
- UniversalSave.TryLoad - try load data by key | ||
- UniversalSave.HasKey - check save key | ||
- UniversalSave.Clear - clear by key (for choosed save storage) | ||
- UniversalSave.ClearAll - clear all saved data (for choosed save storage) | ||
- UniversalSave.DefaultSettings - for change default UniversalSaveSettings | ||
|
||
### UniversalSaveSettings | ||
|
||
You can transfer different settings when using each method, or change the default settings at any time (within the game session). | ||
It is important to use the same settings for saving and loading. | ||
|
||
- StorageType - data storage (PlayerPrefs or FileSystem) (default - PlayerPrefs) | ||
- FormatterType - serialization way (JsonUtility, JsonConvert, Binary) (default - JsonUtility) | ||
|
||
Each has its own advantages and disadvantages. | ||
|
||
JsonConvert not work with unity types (but you can use Unity Converters for Newtonsoft.Json by jilleJr) |