{"id":14960913,"url":"https://github.com/herbou/unityplayerprefsextra","last_synced_at":"2025-10-24T19:30:33.309Z","repository":{"id":107167128,"uuid":"275404252","full_name":"herbou/UnityPlayerPrefsExtra","owner":"herbou","description":"Unity PlayerPrefsExtra gives you the ability to save more complexe data types such as : Vectors, Bool, Colors, Lists, ... and it uses the Unity's PlayerPrefs behind the scene.","archived":false,"fork":false,"pushed_at":"2023-02-25T08:06:11.000Z","size":47,"stargazers_count":41,"open_issues_count":3,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-03-04T15:29:14.567Z","etag":null,"topics":["playerprefs","unity","unity-playerprefs","unity-playerprefsextra","unity-scripts","unitypackage"],"latest_commit_sha":null,"homepage":"","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/herbou.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"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},"funding":{"custom":["https://paypal.me/hamzaherbou"]}},"created_at":"2020-06-27T15:51:25.000Z","updated_at":"2024-04-14T17:50:39.569Z","dependencies_parsed_at":"2024-04-14T18:00:49.407Z","dependency_job_id":null,"html_url":"https://github.com/herbou/UnityPlayerPrefsExtra","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/herbou%2FUnityPlayerPrefsExtra","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/herbou%2FUnityPlayerPrefsExtra/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/herbou%2FUnityPlayerPrefsExtra/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/herbou%2FUnityPlayerPrefsExtra/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/herbou","download_url":"https://codeload.github.com/herbou/UnityPlayerPrefsExtra/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219868063,"owners_count":16555878,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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-playerprefs","unity-playerprefsextra","unity-scripts","unitypackage"],"created_at":"2024-09-24T13:23:25.326Z","updated_at":"2025-10-24T19:30:32.944Z","avatar_url":"https://github.com/herbou.png","language":"C#","funding_links":["https://paypal.me/hamzaherbou"],"categories":[],"sub_categories":[],"readme":"# Unity PlayerPrefsExtra\n### Video tutorial : [https://youtu.be/wqRYdFcfiVw](https://youtu.be/wqRYdFcfiVw)\n![Video thumbnail](https://img.youtube.com/vi/wqRYdFcfiVw/0.jpg)\n\n\nUnity PlayerPrefsExtra gives you the ability to save more complexe data types such as :\nVectors, Bool, Colors, Lists, ...\nand it uses the Unity's PlayerPrefs under the hood.\n\n# ⁉ How to use :\nUse the same syntaxe as PlayerPrefs.\n\n\n## ■ Booleans :\n```c#\n//Load\nbool b = PlayerPrefsExtra.GetBool(\"mybool\", false);\n\n//Update (flip value)\nb = !b;\n\n//Save\nPlayerPrefsExtra.SetBool(\"mybool\", b);\n```\n\n\u003cbr /\u003e\n\n## ■ Vectors ( Vector2, Vector3, and Vector4 ):\n```c#\n//Load\nVector2 v = PlayerPrefsExtra.GetVector2(\"myV2\", Vector2.zero);\n\n//Update\nv+=Vector2.one;\n\n//Save\nPlayerPrefsExtra.SetVector2(\"myV2\", v);\n```\n\n\u003cbr /\u003e\n\n## ■ Colors :\n```c#\n// Get color\nColor c = PlayerPrefsExtra.GetColor(\"Col\");\n\n// Set color\nPlayerPrefsExtra.SetColor(\"Col\", Color.red);\n```\n\n\u003cbr /\u003e\n\n## ■ Quaternions :\n```c#\n// Get Quaternion\nQuaternion qua = PlayerPrefsExtra.GetQuaternion(\"q\");\n\n//Set Quaternion\nPlayerPrefsExtra.SetQuaternion(\"q\", qua);\n```\n\n\u003cbr /\u003e\n\n## ■ Lists :\n```c#\n// Get List\nList\u003cfloat\u003e list = PlayerPrefsExtra.GetList\u003cfloat\u003e(\"myList\", new List\u003cfloat\u003e());\n\n// Add data to List\nlist.Add(Random.Range(100,900);\n\n// Save List\nPlayerPrefsExtra.SetList(\"myList\", list);\n```\n\n\u003cbr /\u003e\n\n## ■ Objects :\n```c#\n//Class\n[System.Serializable]\npublic class Shape{\n\tpublic int totalPoints = 3;\n\tpublic float strokeWidth = 0f;\n\tpublic List\u003cVector3\u003e points = new List\u003cVector3\u003e();\n}\n```\n```c#\n// Get object\nShape s = PlayerPrefsExtra.GetObject\u003cShape\u003e(\"myShape\", new Shape());\n\n// Update object data\ns.strokeWidth++;\ns.points.Add(Vector3.one*Random.Range(0f,3f));\n\n// Save object\nPlayerPrefsExtra.SetObject(\"myShape\", s);\n```\n\n\u003cbr /\u003e\n\n## ■ Delete All Keys (both PlayerPrefs \u0026 PlayerPrefsExtra) :\nuse PlayerPrefs instead of PlayerPrefsExtra\n```c#\nPlayerPrefs.DeleteAll();\n```\n\n\u003cbr /\u003e\n\n## ■ Delete one key :\nuse PlayerPrefs instead of PlayerPrefsExtra\n```c#\nPlayerPrefs.DeleteKey(\"Key\");\n```\n\n\u003cbr /\u003e\n\n## ■ Check key existance :\nuse PlayerPrefs instead of PlayerPrefsExtra\n```c#\nPlayerPrefs.HasKey(\"Key\");\n```\n\n\n\u003cbr\u003e\u003cbr\u003e\n\u003cbr\u003e\n## ❤️ Donate  \n\u003ca href=\"https://paypal.me/hamzaherbou\" title=\"https://paypal.me/hamzaherbou\" target=\"_blank\"\u003e\u003cimg align=\"left\" height=\"50\" src=\"https://www.mediafire.com/convkey/72dc/iz78ys7vtfsl957zg.jpg\" alt=\"Paypal\"\u003e\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fherbou%2Funityplayerprefsextra","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fherbou%2Funityplayerprefsextra","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fherbou%2Funityplayerprefsextra/lists"}