{"id":23660625,"url":"https://github.com/ishix-g/idreference","last_synced_at":"2025-07-09T10:34:38.170Z","repository":{"id":65580065,"uuid":"368592882","full_name":"IShix-g/IDReference","owner":"IShix-g","description":"[Unity] Users want to easily change the Name, while the system requires a unique, unchanging ID. IDReference balances these conflicting requirements.  ユーザーが簡単にNameを変更できる一方、システムでは一意で変わらないIDが必要です。IDReferenceは、この相反する要件を両立します。","archived":false,"fork":false,"pushed_at":"2025-07-03T02:03:43.000Z","size":2653,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-03T03:20:37.988Z","etag":null,"topics":["management-id","unity","unity3d"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/IShix-g.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":"IShix-g"}},"created_at":"2021-05-18T16:10:29.000Z","updated_at":"2025-07-03T02:03:47.000Z","dependencies_parsed_at":"2024-03-15T09:49:48.487Z","dependency_job_id":"54db74a3-6968-4daf-8020-80210b7a4e17","html_url":"https://github.com/IShix-g/IDReference","commit_stats":null,"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"purl":"pkg:github/IShix-g/IDReference","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IShix-g%2FIDReference","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IShix-g%2FIDReference/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IShix-g%2FIDReference/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IShix-g%2FIDReference/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/IShix-g","download_url":"https://codeload.github.com/IShix-g/IDReference/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IShix-g%2FIDReference/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264440653,"owners_count":23608743,"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":["management-id","unity","unity3d"],"created_at":"2024-12-29T03:59:12.612Z","updated_at":"2025-07-09T10:34:38.159Z","avatar_url":"https://github.com/IShix-g.png","language":"C#","funding_links":["https://github.com/sponsors/IShix-g"],"categories":[],"sub_categories":[],"readme":"![Unity](https://img.shields.io/badge/Unity-2021.3%2B-black)\n\n[README - 日本語版](README_jp.md)\n\n![IDReference](ReadMeImages/image1.png)\n\n# Easily manage your ID.\n\nUsers want to be able to easily select and change the `Name`.  \nThe system needs a unique `ID` that will never change.  \n`IDReference` satisfies the exact opposite requirements of the user and the system.\n\n![manage your ID](ReadMeImages/image10.png)\n\n## Easy selection\n\nJust select from the pull-down menu and you won't make a mistake.\n\n```c#\n[SerializeField, CharacterIDReference] string characterID;\n//Inspector:Cat 猫 characterID:IDRef-Character-iwp05\n```\n![Easy setting](ReadMeImages/image2.png)\n\n## Changeable\n\nThe dedicated panel makes it easy to modify.\n\n- Changing the name does not affect the reference in the destination.\n- Changing the order will not affect the reference in the destination.\n- Using a language other than English is not a problem.\n\n![Changeable](ReadMeImages/image3.png)\n\n## See where to use ID.\n\nThe dedicated panel makes it easy to modify.\n\n- Show all references\n- Jump to references\n- Print reference\n\n![where to use ID](ReadMeImages/image4.png)\n\n# Getting started\n\n## Package Manager\n\n#### URL\n```\nhttps://github.com/IShix-g/IDReference.git?path=Assets/Plugins/IDReference\n```\n\n### [Unity 2019.3 higher] Install via git URL\nAdd the Url to Package Manager\n\n![Package Manager](ReadMeImages/image5.png)\n\n## Unitypackage\n\n[IDReference/releases](https://github.com/IShix-g/IDReference/releases/)\n\n![Unitypackage](ReadMeImages/image6.png)\n\n# Quick Start\n\n### [Step1] Initialization.\n\n```c#\n#if UNITY_EDITOR\nusing UnityEditor;\nusing IDRef;\n\n// [Step1] Initialization (editor only)\n[InitializeOnLoad]\npublic sealed class IDReferenceSetting\n{\n    static IDReferenceTable characterTable;\n\n    static IDReferenceSetting()\n    {\n        characterTable = new IDReferenceTable(\"Character\", false, false);\n        IDReferenceProvider.SetTable(characterTable);\n    }\n}\n#endif\n```\n\n### [Step2] Defining Attributes.\n\n```c#\nusing IDRef;\n\npublic sealed class CharacterIDReferenceAttribute : IDReferenceAttribute\n{\n    public override string GetTableID() =\u003e \"Character\";\n}\n```\n\n### [Step3] Adding attributes to scripts.\n\n```c#\nusing UnityEngine;\n\npublic sealed class IDReferenceTest : MonoBehaviour\n{\n    [SerializeField, CharacterIDReference] string characterID;\n```\n\n### [Step4] Adding an ID\n\n![Adding an ID](ReadMeImages/image3.png)\n\n### [Option] Custom menu\n\nYou can access the `ID reference list` by adding a custom menu.  \nIt is useful to have it set up.\n\n![Custom menu](ReadMeImages/image9.png)\n\n```c#\nstatic IDReferenceTable characterTable;\n\nstatic IDReferenceSetting()\n{\n    characterTable = new IDReferenceTable(\"Character\", false, false);\n    IDReferenceProvider.SetTable(characterTable);\n}\n\n// Add to menu\n[MenuItem(\"IDReference/Character\")]\npublic static void CharacterCustomMenu()\n{\n    characterTable.ShowSettingDialog();\n}\n```\n\n### Notes.\n\n\u003e - Multiple registrations are also possible.\n\u003e - All of this is only available in the Unity Editor.\n\u003e - The initialization code must be enclosed in `UNITY_EDITOR`.\n\u003e - Do NOT enclose the Attribute code in `UNITY_EDITOR`, as it will be referenced by other classes.\n\n# Options\n\n## Disable the Delete button\n\nIf you delete an ID, you can no longer reference that ID. This is the only weakness of `IDReference`.  \nIf you disable the delete button, you can sleep easy knowing that the reference will never be corrupted :)\n\n```c#\ncharacterTable = new IDReferenceTable(\"Character\", disableRemoveButton: true);\n```\n\n![Delete button](ReadMeImages/image7.png)\n\n## Disable add ID in dropdown.\n\nBy disabling add ID in the drop-down, you can make it so that only you can edit it.\n\n```c#\ncharacterTable = new IDReferenceTable(\"Character\", disableDropDownAddID: true);\n```\n\n![add ID in dropdown](ReadMeImages/image8.png)\n\n## Set initial values\n\nBy setting initial values, you can set your own ID.\nThe added ID cannot be deleted or edited and is displayed in blue text.\n\n```c#\ncharacterTable = new IDReferenceTable(\"Character\", required: new []{ new IDReference(\"Mob モブ\", \"Mob\") });\n```\n\n![ID list](ReadMeImages/image14.png)\n\n# ID Reference Object\n\n**Editor only.**\n\n![IDReference](ReadMeImages/image11.png)\n\nIf IDs alone are difficult to understand, you can use `ToIDReferenceEditorOnly()` to convert the string into an `IDReference Object`.\n\n```c#\n\nusing UnityEngine;\n\npublic sealed class IDReferenceTest : MonoBehaviour\n{\n    [SerializeField, CharacterIDReference] string characterID;\n\n    void Start()\n    {\n#if UNITY_EDITOR\n        // convert to IdReference\n        var idReference = characterID.ToIDReferenceEditorOnly();\n        \n        if (idReference.IsValid())\n        {\n            var name = idReference.Name;\n            var id = idReference.ID;\n    \n            Debug.Log($\"Name:{name} ID:{id}\");\n            // Name:Cat 猫 ID:IDRef-Character-iwp05\n        }\n#endif\n    }\n}\n```\n\n# CSV Import / Export\n\n`Shift_JIS` support.\n\n![ID list](ReadMeImages/image13.png)\n\n# Comparison of ID management\n\nIt is assumed that the settings are made from the Unity inspector.\n\n|    |  IDReference  |  int  |  string  |  enum  |\n| ---- | ---- | ---- | ---- | ---- |\n|  Rename   |  Excellent  |  Poor  |  Poor  | Excellent |\n|  Reorder  |  Excellent  |  Fair  |  Fair  | Fair |\n|  Use  |  Excellent  |  Poor  |  Poor  | Excellent |\n|  Understandability  |  Excellent  |  Poor  |  Excellent  | Excellent |\n|  Reference check  |  Excellent  |  N/A  |  N/A  | N/A |\n\n# Sample ID list\n\nCharacter / Item / Monster / Story\n\n![ID list](ReadMeImages/image12.png)\n\n# Library\n\n- [stevehansen/csv](https://github.com/stevehansen/csv)  \n  I use it for importing and exporting CSV.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fishix-g%2Fidreference","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fishix-g%2Fidreference","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fishix-g%2Fidreference/lists"}