Skip to content

Commit

Permalink
Create README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
boristv authored Apr 10, 2023
1 parent b6b5971 commit 8689937
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions README.md
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)

0 comments on commit 8689937

Please sign in to comment.