Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanMurzak committed Feb 9, 2023
2 parents 4be324a + ecaa8f2 commit 815d0c5
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,22 @@

Lightweight package with optimized advanced version of PlayerPrefs. Under the hood it uses the same PlayerPrefs system, but creates flexible wrapper for default system.


### Static API Usage
``` C#
using Extensions.Unity.PlayerPrefsEx;

// Static Getters // Static Setters
PlayerPrefsEx.GetInt("key"); PlayerPrefsEx.SetInt("key", 10);
PlayerPrefsEx.GetBool("key"); PlayerPrefsEx.SetBool("key", false);
PlayerPrefsEx.GetFloat("key"); PlayerPrefsEx.SetFloat("key", 2.123f);
PlayerPrefsEx.GetString("key"); PlayerPrefsEx.SetString("key", "hello world");
PlayerPrefsEx.GetBigInt("key"); PlayerPrefsEx.SetBigInt("key", BigInteger.Parse("100"));
PlayerPrefsEx.GetDateTime("key"); PlayerPrefsEx.SetDateTime("key", DateTime.Now);
PlayerPrefsEx.GetVector2("key"); PlayerPrefsEx.SetVector2("key", Vector2.up);
PlayerPrefsEx.GetVector2Int("key"); PlayerPrefsEx.SetVector2Int("key", Vector2Int.up);
PlayerPrefsEx.GetVector3("key"); PlayerPrefsEx.SetVector3("key", Vector3.up);
PlayerPrefsEx.GetVector3Int("key"); PlayerPrefsEx.SetVector3Int("key", Vector3Int.up);
PlayerPrefsEx.GetJson<Player>("key"); PlayerPrefsEx.SetJson<Player>("key", new Player()); // <<<-------- Generic
PlayerPrefsEx.GetInt("key"); PlayerPrefsEx.SetInt("key", 10);
PlayerPrefsEx.GetBool("key"); PlayerPrefsEx.SetBool("key", false);
PlayerPrefsEx.GetFloat("key"); PlayerPrefsEx.SetFloat("key", 2.123f);
PlayerPrefsEx.GetString("key"); PlayerPrefsEx.SetString("key", "hello world");
PlayerPrefsEx.GetBigInt("key"); PlayerPrefsEx.SetBigInt("key", BigInteger.Parse("100"));
PlayerPrefsEx.GetDateTime("key"); PlayerPrefsEx.SetDateTime("key", DateTime.Now);
PlayerPrefsEx.GetVector2("key"); PlayerPrefsEx.SetVector2("key", Vector2.up);
PlayerPrefsEx.GetVector2Int("key"); PlayerPrefsEx.SetVector2Int("key", Vector2Int.up);
PlayerPrefsEx.GetVector3("key"); PlayerPrefsEx.SetVector3("key", Vector3.up);
PlayerPrefsEx.GetVector3Int("key"); PlayerPrefsEx.SetVector3Int("key", Vector3Int.up);
PlayerPrefsEx.GetJson<Player>("key"); PlayerPrefsEx.SetJson<Player>("key", new Player()); <--- Generic
```

### Variables API Usage
Expand Down

0 comments on commit 815d0c5

Please sign in to comment.