-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use PlayerPrefs for secure storage while working in the editor - easi…
…er to debug (#221)
- Loading branch information
1 parent
c5126d1
commit 31eb2ac
Showing
4 changed files
with
29 additions
and
2 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
Packages/Sequence-Unity/Sequence/SequenceSDK/Utils/SecureStorage/EditorSecureStorage.cs
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,22 @@ | ||
using UnityEngine; | ||
|
||
namespace Sequence.Utils.SecureStorage | ||
{ | ||
public class EditorSecureStorage : ISecureStorage | ||
{ | ||
public void StoreString(string key, string value) | ||
{ | ||
PlayerPrefs.SetString(key, value); | ||
PlayerPrefs.Save(); | ||
} | ||
|
||
public string RetrieveString(string key) | ||
{ | ||
return PlayerPrefs.GetString(key); | ||
} | ||
|
||
public EditorSecureStorage() | ||
{ | ||
} | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
Packages/Sequence-Unity/Sequence/SequenceSDK/Utils/SecureStorage/EditorSecureStorage.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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