{"id":22576247,"url":"https://github.com/doyasu24/prefswrapper","last_synced_at":"2026-03-02T17:36:32.665Z","repository":{"id":139298848,"uuid":"127413336","full_name":"doyasu24/PrefsWrapper","owner":"doyasu24","description":"Extensible PlayerPrefs wrapper","archived":false,"fork":false,"pushed_at":"2024-10-29T14:53:29.000Z","size":104,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-10T17:34:06.054Z","etag":null,"topics":["playerprefs","unity","unity-editor"],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/doyasu24.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-03-30T10:06:13.000Z","updated_at":"2024-10-29T14:51:52.000Z","dependencies_parsed_at":"2024-01-26T20:43:27.353Z","dependency_job_id":"bd6358a5-6501-471a-8b9a-2beb97d8654f","html_url":"https://github.com/doyasu24/PrefsWrapper","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/doyasu24/PrefsWrapper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doyasu24%2FPrefsWrapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doyasu24%2FPrefsWrapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doyasu24%2FPrefsWrapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doyasu24%2FPrefsWrapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/doyasu24","download_url":"https://codeload.github.com/doyasu24/PrefsWrapper/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doyasu24%2FPrefsWrapper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30012001,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-02T17:00:27.440Z","status":"ssl_error","status_checked_at":"2026-03-02T17:00:03.402Z","response_time":60,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["playerprefs","unity","unity-editor"],"created_at":"2024-12-08T04:06:30.622Z","updated_at":"2026-03-02T17:36:32.630Z","avatar_url":"https://github.com/doyasu24.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PrefsWrapper\n\nExtensible PlayerPrefs wrapper.\n\nAES encryption support\n\n## Support types\n- int\n- bool\n- byte\n- sbyte\n- char\n- short\n- ushort\n- float\n- string\n- byte[]\n- DateTime\n- TimeSpan\n- Enum\n- Json (UnityEngine.JsonUtility)\n  - Vector2, 3, 4\n  - Quaternion\n  - Color\n  - ...\n  - struct in UnityEngine\n\n# Install\n\nYou can add https://github.com/doyasu24/PrefsWrapper.git?path=Assets/Plugins/PrefsWrapper#1.0.1 to Package Manager.\n\nsee `Assets/Examples/Sample.unity` scene.\n\n# Sample\n\n```Sample.cs\nusing UnityEngine;\n\nnamespace PrefsWrapper.Examples\n{\n    public class Sample : MonoBehaviour\n    {\n        // memory cache preference\n        private readonly IPreference\u003cstring\u003e _stringTestPref = PreferenceFactory.CreateStringPref(\"string-test-key\");\n\n        // non-memory cache preference\n        private readonly IPreference\u003cint\u003e _intTestPref = PreferenceFactory.CreateIntPref(\"int-test-key\", enableMemCachePref: false);\n\n        // AES encoding preference\n        private readonly IPreference\u003cVector3\u003e _cryptoPref = PreferenceFactory.CreateJsonCryptoPref\u003cVector3\u003e(\n            key: \"vector3-crypto-test\",\n            password: \"password\",\n            salt: \"salt1234567890\"\n        );\n\n        private void Start()\n        {\n            // call PlayerPrefs.HasKey internally\n            Debug.Log($\"HasValue: {_stringTestPref.HasValue}\");\n\n            // call PlayerPrefs.GetString internally\n            Debug.Log($\"GetValueOrDefault: {_stringTestPref.GetValueOrDefault(\"default value\")}\");\n            \n            // call PlayerPrefs.DeleteKey internally\n            _stringTestPref.DeleteValue();\n\n            // call PlayerPrefs.SetString internally and set value to memory cache\n            _stringTestPref.Value = \"test\";\n            \n            // get value from memory cache\n            Debug.Log($\"Value: {_stringTestPref.Value}\");\n            \n\n            _cryptoPref.Value = Vector3.up;\n            Debug.Log($\"CryptoPref Decode: {_cryptoPref.Value}\");\n\n            // key and value are encrypted\n            // return false\n            Debug.Log($\"PlayerPrefs.HasKey(\\\"vector3-crypto-test\\\"): {PlayerPrefs.HasKey(\"vector3-crypto-test\")}\");\n        }\n    }\n}\n```\n\n# How to customize\n\nsee `PrefsWrapper.PreferenceFactory`\n\nimplement `IPrefsSerializer\u003cT\u003e` and `IEncoder\u003cT\u003e`\n\n# License\n\nMIT License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoyasu24%2Fprefswrapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdoyasu24%2Fprefswrapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoyasu24%2Fprefswrapper/lists"}