{"id":13663062,"url":"https://github.com/AscheLab/AscheLib.SerializableDictionary","last_synced_at":"2025-04-25T13:31:21.815Z","repository":{"id":219335491,"uuid":"237972406","full_name":"AscheLab/AscheLib.SerializableDictionary","owner":"AscheLab","description":"Dictionary that can be edit on Inspector","archived":false,"fork":false,"pushed_at":"2022-02-17T10:37:16.000Z","size":2503,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-10T19:33:33.732Z","etag":null,"topics":["unity","unity-editor"],"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/AscheLab.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}},"created_at":"2020-02-03T13:32:50.000Z","updated_at":"2022-01-20T12:18:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"329b21f6-07cd-4f88-b369-c7ae459db358","html_url":"https://github.com/AscheLab/AscheLib.SerializableDictionary","commit_stats":null,"previous_names":["aschelab/aschelib.serializabledictionary"],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AscheLab%2FAscheLib.SerializableDictionary","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AscheLab%2FAscheLib.SerializableDictionary/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AscheLab%2FAscheLib.SerializableDictionary/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AscheLab%2FAscheLib.SerializableDictionary/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AscheLab","download_url":"https://codeload.github.com/AscheLab/AscheLib.SerializableDictionary/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250824937,"owners_count":21493368,"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":["unity","unity-editor"],"created_at":"2024-08-02T05:02:16.402Z","updated_at":"2025-04-25T13:31:21.435Z","avatar_url":"https://github.com/AscheLab.png","language":"C#","funding_links":[],"categories":["C\\#"],"sub_categories":[],"readme":"# AscheLib.SerializableDictionary\nCreated by Syunta Washidu (AscheLab)\n\n## What's SerializableDictionary?\nSerializableDictionary is an alternative class to System.Collections.Generic.Dictionary \u003cTKey, TValue\u003e class that can be displayed and edited in Inspector.\n\n## Install\n### Using UnityPackageManager\nFind the manifest.json file in the Packages folder of your project and edit it to look like this.\n```\n\"scopedRegistries\": [\n    {\n      \"name\": \"Unofficial Unity Package Manager Registry\",\n      \"url\": \"https://upm-packages.dev\",\n      \"scopes\": [\n        \"com.aschelab\"\n      ]\n    }\n  ],\n  \"dependencies\": {\n    \"com.aschelab.serializabledictionary\": \"1.4.4\",\n  ...\n  }\n```\n## Using for SerializableDictionary\n```csharp\nusing System;\nusing UnityEngine;\nusing AscheLib.Collections;\n```\n```csharp\n// Define KeyValuePair class that can be displayed in Inspector (key: string, value: int)\n[Serializable] public class SerializableKeyValuePair : SerializableKeyValuePairBase\u003cstring, int\u003e { }\n// Define Dictionary class that can be displayed in Inspector (key: string, value: int)\n[Serializable] public class SerializableDictionary : SerializableDictionaryBase\u003cstring, int, SerializableKeyValuePair\u003e { }\n\n// Use the Dictionary class that can be displayed in the Inspector\npublic SerializableDictionary _testDictionary;\n\n// It can be used like System.Collections.Generic.Dictionary\u003cTKey, TValue\u003e class\nprivate void Start() {\n  if(!_testDictionary.ContainsKey(\"zzz\")) {\n    _testDictionary.Add(\"zzz\", 2525);\n  }\n  int zzzValue = _testDictionary[\"zzz\"];\n  Debug.Log(zzzValue);\n}\n```\nIf it is Unity 2020.1 or later, you can also write as follows\n```csharp\n// How to write Unity 2020.1 and above\npublic SerializableDictionary\u003cstring, int\u003e _testDictionary;\nprivate void Start() {\n  if(!_testDictionary.ContainsKey(\"zzz\")) {\n    _testDictionary.Add(\"zzz\", 2525);\n  }\n  int zzzValue = _testDictionary[\"zzz\"];\n  Debug.Log(zzzValue);\n}\n```\n\n## Displayed on Inspector\n![D1iYX-cU8AADGOD](https://user-images.githubusercontent.com/47095602/54342456-db90c680-467f-11e9-83b7-ae72eed0cbb0.png)\n\n## License\nThis library is under the MIT License.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAscheLab%2FAscheLib.SerializableDictionary","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAscheLab%2FAscheLib.SerializableDictionary","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAscheLab%2FAscheLib.SerializableDictionary/lists"}