{"id":20336770,"url":"https://github.com/zenvin-dev/unityprojectpreferences","last_synced_at":"2025-07-27T09:40:50.750Z","repository":{"id":189212948,"uuid":"642132984","full_name":"zenvin-dev/UnityProjectPreferences","owner":"zenvin-dev","description":"Like Unity's built-in EditorPrefs, but relative to a single project.","archived":false,"fork":false,"pushed_at":"2023-06-20T21:17:00.000Z","size":21,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-14T17:19:53.735Z","etag":null,"topics":[],"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/zenvin-dev.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}},"created_at":"2023-05-17T22:33:55.000Z","updated_at":"2023-10-24T14:42:19.000Z","dependencies_parsed_at":"2023-08-18T20:24:56.977Z","dependency_job_id":null,"html_url":"https://github.com/zenvin-dev/UnityProjectPreferences","commit_stats":null,"previous_names":["xzenvin/unityprojectpreferences","zenvin-dev/unityprojectpreferences"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zenvin-dev%2FUnityProjectPreferences","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zenvin-dev%2FUnityProjectPreferences/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zenvin-dev%2FUnityProjectPreferences/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zenvin-dev%2FUnityProjectPreferences/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zenvin-dev","download_url":"https://codeload.github.com/zenvin-dev/UnityProjectPreferences/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241859682,"owners_count":20032318,"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":[],"created_at":"2024-11-14T21:06:47.316Z","updated_at":"2025-03-04T13:45:14.844Z","avatar_url":"https://github.com/zenvin-dev.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# UnityProjectPreferences\nSimilar to Unity's built-in EditorPrefs, but relative to a single project. And more versatile.\n\nProject preferences are stored as binary data in the project directory. Changes will be saved automatically on domain reload and on quitting the editor.\nThe `ProjectPrefs` class provides ways to interface with the stored data:\n\n| Method Signature | Description |\n|-|-|\n| `public static void Save ()` | Write all current keys and their values to the preferences file. |\n| `public static bool SetValue (PrefKey key, PrefValue value)` | Attempts to set the value associated with the given key. \u003cbr\u003e Will always replace existing values. |\n| `public static bool SetValue (PrefKey key, PrefValue value, ValueOverrideOption overrideOption)` | Attempts to set the value associated with the given key. \u003cbr\u003e Whether existing values are replaced, depends on the given \u003csee cref=\"ValueOverrideOption\"/\u003e. \u003cbr\u003e Returns `true` if the value was set, otherwise `false`. |\n| `public static object GetValue (PrefKey key)` | Gets the value associated with the given key as an \u003csee cref=\"object\"/\u003e. \u003cbr\u003e The value associated with the given key as an `object`. Otherwise `null`. |\n| `public static bool TryGetValue (PrefKey key, out object value)` | Attempts to get the value associated with the given key. \u003cbr\u003e Returns `true` if the key exists in the preferences, otherwise `false`. |\n| `public static bool GetBool (PrefKey key, bool fallback)` |  |\n| `public static int GetInt (PrefKey key, int fallback)` |  |\n| `public static string GetString (PrefKey key, string fallback)` |  |\n| `public static float GetFloat (PrefKey key, float fallback)` |  |\n| `public static bool TryGetBool (PrefKey key, out bool value)` |  |\n| `public static bool TryGetInt (PrefKey key, out int value)` |  |\n| `public static bool TryGetString (PrefKey key, out string value)` |  |\n| `public static bool TryGetFloat (PrefKey key, out float value)` |  |\n| `public static bool HasKey (PrefKey key)` | Checks whether a given key exists in the preferences. |\n| `public static bool HasKey (Func\u003cPrefKey, bool\u003e filter)` | Checks whether any key exists in the preferences, that matches a given filter. |\n| `public static bool DeleteKey (PrefKey key)` | Deletes a given key from the preferences. |\n| `public static int DeleteKeys (Func\u003cPrefKey, bool\u003e filter)` | Deletes all keys from the preferences, that match a given filter. |\n| `public static List\u003cPrefKey\u003e GetKeys (Func\u003cPrefKey, bool\u003e filter)` | Returns a collection of all keys in the preferences, that match a given filter. |\n| `public static void DeleteAll ()` | Clears out all keys in the preferences. |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzenvin-dev%2Funityprojectpreferences","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzenvin-dev%2Funityprojectpreferences","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzenvin-dev%2Funityprojectpreferences/lists"}