Skip to content

Commit

Permalink
Use PlayerPrefs for secure storage while working in the editor - easi…
Browse files Browse the repository at this point in the history
…er to debug (#221)
  • Loading branch information
BellringerQuinn authored Dec 17, 2024
1 parent c5126d1 commit 31eb2ac
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 2 deletions.
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()
{
}
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ public static class SecureStorageFactory
{
public static ISecureStorage CreateSecureStorage()
{
#if UNITY_IOS && !UNITY_EDITOR
#if UNITY_EDITOR
return new EditorSecureStorage();
#elif UNITY_IOS && !UNITY_EDITOR
return new iOSKeychainStorage();
#elif UNITY_STANDALONE_OSX || UNITY_EDITOR_OSX
return new MacOSKeychainStorage();
Expand Down
2 changes: 1 addition & 1 deletion Packages/Sequence-Unity/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "xyz.0xsequence.waas-unity",
"version": "3.14.0",
"version": "3.14.1",
"displayName": "Sequence Embedded Wallet SDK",
"description": "A Unity SDK for the Sequence WaaS API",
"unity": "2021.3",
Expand Down

0 comments on commit 31eb2ac

Please sign in to comment.