{"id":19905122,"url":"https://github.com/solutena/iddata","last_synced_at":"2025-11-26T01:05:04.310Z","repository":{"id":150488521,"uuid":"572580494","full_name":"solutena/IDData","owner":"solutena","description":null,"archived":false,"fork":false,"pushed_at":"2024-05-13T00:56:34.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-01T07:42:14.278Z","etag":null,"topics":["design-pattern","json","null","serialize","unity"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/solutena.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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,"publiccode":null,"codemeta":null}},"created_at":"2022-11-30T15:23:39.000Z","updated_at":"2024-05-13T00:56:37.000Z","dependencies_parsed_at":"2024-05-13T01:43:26.052Z","dependency_job_id":"e4954852-0c3e-46d5-bf7e-c8d8a0fcc6a8","html_url":"https://github.com/solutena/IDData","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/solutena/IDData","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solutena%2FIDData","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solutena%2FIDData/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solutena%2FIDData/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solutena%2FIDData/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/solutena","download_url":"https://codeload.github.com/solutena/IDData/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solutena%2FIDData/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286079811,"owners_count":27282121,"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","status":"online","status_checked_at":"2025-11-25T02:00:05.816Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["design-pattern","json","null","serialize","unity"],"created_at":"2024-11-12T20:31:31.100Z","updated_at":"2025-11-26T01:05:04.278Z","avatar_url":"https://github.com/solutena.png","language":"C#","readme":"# IDData\n\nJson을 통해 파일로 저장 / 불러오기를 위한 데이터의 베이스입니다.\n\n유니티에서 `Serializable` 데이터를 `null` 검사 할 때,\n\n`null`이 아닌 `default`값 으로 초기화되어 `null` 검사가 정상적으로 동작하지 않는 문제가 있습니다.\n\n이를 해결하기 위해서 객체를 생성할때 고유한 ID값(`GUID`)을 생성합니다.\n\n`default`값으로 초기화 된다면 ID값(`GUID`)이 비어 있으므로 `null`로 취급하게 합니다.\n\n`Serializable` 데이터를 사용할 때 이 클래스를 상속하여 사용하면\n\n`null`검사를 정상적으로 처리할 수 있습니다.\n\n## 예제\n\n```\n[Serializable]\npublic class Monster : IDData\n{\n\t[SerializeField] int hp = 0;\n\t[SerializeField] int mp = 0;\n}\n```\n\nJson으로 변환될 데이터에 IDData를 상속해줍니다.\n\n```\nif (this == null)\n\treturn;\n```\nIDData가 상속된 데이터는\n\n다음과 같이 null 검사를 할 수 있습니다.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolutena%2Fiddata","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsolutena%2Fiddata","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolutena%2Fiddata/lists"}