{"id":23066481,"url":"https://github.com/xjine/unity_layermanager","last_synced_at":"2026-05-03T02:39:07.388Z","repository":{"id":83606990,"uuid":"148282391","full_name":"XJINE/Unity_LayerManager","owner":"XJINE","description":"Assist to manage layer index and the name via script.","archived":false,"fork":false,"pushed_at":"2018-09-12T03:02:05.000Z","size":21,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-03T09:12:52.586Z","etag":null,"topics":["assets","unity"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/XJINE.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":"2018-09-11T08:03:05.000Z","updated_at":"2022-05-13T20:51:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"ffe405f5-a252-4d5a-aa11-5e7ee447a760","html_url":"https://github.com/XJINE/Unity_LayerManager","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/XJINE/Unity_LayerManager","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XJINE%2FUnity_LayerManager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XJINE%2FUnity_LayerManager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XJINE%2FUnity_LayerManager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XJINE%2FUnity_LayerManager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/XJINE","download_url":"https://codeload.github.com/XJINE/Unity_LayerManager/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XJINE%2FUnity_LayerManager/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32556771,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T00:31:16.350Z","status":"online","status_checked_at":"2026-05-03T02:00:09.297Z","response_time":103,"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":["assets","unity"],"created_at":"2024-12-16T05:13:25.149Z","updated_at":"2026-05-03T02:39:07.374Z","avatar_url":"https://github.com/XJINE.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Unity_LayerManager\n\nAssist to manage layer index and the name via script.\n\n## Import to Your Project\n\nYou can import this asset from UnityPackage.\n\n- [LayerManager.unitypackage](https://github.com/XJINE/Unity_LayerManager/blob/master/LayerManager.unitypackage)\n\n## How to Use\n\nRegister layer index and the name when set the layer to any objects in dynamically.\n\nNOTE:\n\nUnity prepares ``32`` layers and the ``0`` ~ ``7`` layer are reserved in default.\n\n### GetMinUnusedLayerIndex\n\n``GetMinUnusedLayerIndex`` function returns a index which is unused.\nWhen all of the layer index is used, it will return ``-1``.\n\n### AddNewLayer\n\n``AddNewLayer`` function register new index and the name to ``LayerManager``.\nThis function enable to set any layer index as you like, but if omitted, the layer index will be unused min value.\n\nWhen all of the layer index or just you set is already used, this function will failed and return ``-1``.\nAnd when you set existing name, it will also failed.\n\n### GetLayerName / GetLayerIndex\n\n``GetLayerName`` function returns a name with index. If the index is never used, it will return ``null``.\n\n``GetLayerIndex`` function returns a index with name, and returns ``null`` when the name is never used.\n\n### LayerToName / NameToLayer\n\n``LayerToName`` and ``NameToLayer`` functions are same with ``GetLayerName`` and ``GetLayerIndex``.\n\n## Limitation\n\n### Compatibility\n\nThere is no compatibility with default Unity functions such as ``LayerMask.NameToLayer`` or any others.\nSo the layer which handled with ``LayerManager`` can't be find with these functions.\n\n### Remove Layer\n\nThere is no function to remove registered layer because some objects may belong the layer when it is removed.\nAnd then, there is no way to find and remove these objects.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxjine%2Funity_layermanager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxjine%2Funity_layermanager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxjine%2Funity_layermanager/lists"}