{"id":19553136,"url":"https://github.com/needle-tools/unity-analyzers-starter","last_synced_at":"2025-08-21T05:33:14.249Z","repository":{"id":68246189,"uuid":"471105982","full_name":"needle-tools/unity-analyzers-starter","owner":"needle-tools","description":"Custom Analyzers Sample / Starter","archived":false,"fork":false,"pushed_at":"2023-07-04T13:12:47.000Z","size":130,"stargazers_count":12,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-08-18T09:52:16.709Z","etag":null,"topics":[],"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/needle-tools.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-03-17T18:54:52.000Z","updated_at":"2025-05-10T02:18:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"41ed2d85-5302-4b48-8925-90ac6df444fd","html_url":"https://github.com/needle-tools/unity-analyzers-starter","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/needle-tools/unity-analyzers-starter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/needle-tools%2Funity-analyzers-starter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/needle-tools%2Funity-analyzers-starter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/needle-tools%2Funity-analyzers-starter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/needle-tools%2Funity-analyzers-starter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/needle-tools","download_url":"https://codeload.github.com/needle-tools/unity-analyzers-starter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/needle-tools%2Funity-analyzers-starter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271430802,"owners_count":24758378,"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-08-21T02:00:08.990Z","response_time":74,"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":[],"created_at":"2024-11-11T04:21:46.941Z","updated_at":"2025-08-21T05:33:14.224Z","avatar_url":"https://github.com/needle-tools.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"\nUnity Analyzer test/dev package.\n\nThe included solution is setup to copy the dll to the package on build time\n\n## Introduction\n- Analyzers are dlls in Unity\n- They apply globally if they are outside of an asmdef (can be inside a package) or locally when inside a package\n- Dll settings: turn everything off (Auto Reference, Validate References, Any Platform, Editor, Standalone) and add an AssetTag named \"RoslynAnalyzer\" (the tags ui is not visible inside packages...)\n\n### Examples of Analyzers usage (included in this template)\n\n- Analyzers allow you to run fixes in your IDE:   \n  ![image](https://user-images.githubusercontent.com/5083203/224544009-966f7c18-f654-4cfa-a88c-697d736b33fa.png)\n\n- Analyzers allow you to produce logs, warnings, errors or even compiler errors\n  ![image](https://user-images.githubusercontent.com/5083203/224544054-8b02e1b0-767c-48f3-a3cc-afd16b83c884.png)\n\n\n## Updating the Analyzer \n- Open ``analyzers/UnityAnalyzers.sln``\n- Build ``UnityAnalyzers.csproj``\n- The dll is copied to the ``package`` folder on build and Unity reimports the dll. Done.\n\n## Unity Documentation\n- https://docs.unity3d.com/2021.2/Documentation/Manual/roslyn-analyzers.html \n- **NOTE**: to add the necessary AssetLabel ``RoslynAnalyzer`` the dll must be copied to the Assets folder to show the UI (and can then go to the package)   \n  There are also [two more labels mentiond](https://github.com/needle-mirror/com.unity.entities/blob/2b7ad3ab445aff771ddffa3dd9d330f21fb1dd70/Unity.Entities/SourceGenerators/Source~/README.md?plain=1#L59) `SourceGenerator` and `RunOnlyOnAssembliesWithReference`  \n  Alternativelly you can edit the dll meta manually to add the label:\n  ```meta\n    guid: ...\n    labels:\n    - RoslynAnalyzer\n    PluginImporter:\n      ...\n   \n  ```  \n- [Debugging SourceGenerators](https://github.com/needle-mirror/com.unity.entities/blob/2b7ad3ab445aff771ddffa3dd9d330f21fb1dd70/Unity.Entities/SourceGenerators/Source~/README.md?plain=1#L25)\n\n## Debugging\n\n\n```csharp\n#if DEBUG\n            if (!Debugger.IsAttached)\n            {\n                Debugger.Launch();\n            }\n#endif \n```\n\nWhen using Rider set Rider as the default JIT debugger in Settings/Debugger and clicking the `Set As Default Debugger` button\n![image](https://user-images.githubusercontent.com/5083203/226258311-a702ab99-255a-48a8-9467-a0e5266ee0a3.png)\n\n\n## Other Resources\n- https://github.com/microsoft/Microsoft.Unity.Analyzers\n- https://github.com/Cybermaxs/awesome-analyzers\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneedle-tools%2Funity-analyzers-starter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fneedle-tools%2Funity-analyzers-starter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneedle-tools%2Funity-analyzers-starter/lists"}