{"id":13786505,"url":"https://github.com/haydenjameslee/unity-reference-checker","last_synced_at":"2025-05-11T22:31:25.572Z","repository":{"id":75328618,"uuid":"91176763","full_name":"haydenjameslee/unity-reference-checker","owner":"haydenjameslee","description":"A Unity3D plugin for checking unassigned references in MonoBehaviours at compile time, across scenes.","archived":false,"fork":false,"pushed_at":"2017-07-10T05:44:09.000Z","size":17,"stargazers_count":40,"open_issues_count":3,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-11-17T22:36:22.110Z","etag":null,"topics":["c-sharp","oss","unity3d","unity3d-plugin"],"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/haydenjameslee.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}},"created_at":"2017-05-13T13:38:12.000Z","updated_at":"2024-09-28T14:15:39.000Z","dependencies_parsed_at":"2023-06-06T04:15:12.978Z","dependency_job_id":null,"html_url":"https://github.com/haydenjameslee/unity-reference-checker","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haydenjameslee%2Funity-reference-checker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haydenjameslee%2Funity-reference-checker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haydenjameslee%2Funity-reference-checker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haydenjameslee%2Funity-reference-checker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/haydenjameslee","download_url":"https://codeload.github.com/haydenjameslee/unity-reference-checker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253645198,"owners_count":21941312,"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":["c-sharp","oss","unity3d","unity3d-plugin"],"created_at":"2024-08-03T19:01:17.015Z","updated_at":"2025-05-11T22:31:20.547Z","avatar_url":"https://github.com/haydenjameslee.png","language":"C#","funding_links":[],"categories":["Static Code Analysis"],"sub_categories":[],"readme":"# UnityRefChecker\n\nUnassigned reference warnings at compile time, across scenes.\n\nUnityRefChecker helps you avoid null references in MonoBehaviours by looking through all MonoBehaviour references in a scene and warning you in Unity's console if a reference has not been assigned.\n\nFields that cause a log:\n- Unassigned public MonoBehaviour fields that do not have [IgnoreRefChecker] or [HideInInspector]\n- Unassigned private MonoBehaviour fields that do not have [IgnoreRefChecker] and do have [SerializeField]\n\n\n## Example\n\nHere are some example logs:\n\n![Example logs](http://i.imgur.com/qMypSw9.png \"Example logs\")\n\n\n## Getting Started\n\n1. Open your Unity project\n\n2. Clone this project into the `Assets/` folder\n\n3. Add the `[IgnoreRefChecker]` attribute in front of any members that you wish to keep unassigned\n\n4. In Unity, go to `Window -\u003e UnityRefChecker` to run commands and configure settings\n\n\n## Commands \n\n- `Check All Build Scenes` - Checks all MonoBehaviour references in all scenes listed in the Unity Build Settings\n\n- `Check Open Scene` - Checks all MonoBehaviour references in the currently active scene\n\n\n## Attributes\n\n- `IgnoreRefChecker` - Add this attribute to fields that you wish to keep unassigned. UnityRefChecker will not warn you about these fields\n\n\n## Settings \n\n| Property | Description | Default Value |\n| -------- | ----------- | ------------- |\n| Check after compilation   | Runs the `Check All Build Scenes` command every time Unity finishes compiling | false |\n| Log type  | The severity of the log using Unity's LogType (Error, Log, Warning) | Error |\n| Colorful logs  | Adds color to the Unity console logs to highlight important info | true |\n\n\n## TODO\n\n- Make video tutorial showing the problem this solves\n- Include prefabs in checks\n- Add to Unity Asset Store\n\n\n## Testing\n\nTo test UnityRefChecker create a new Unity project, clone UnityRefChecker and set up a scene like this:\n\n![Test scene](http://i.imgur.com/8TxyP84.png \"Example test scene structure\")\n\nThen open the UnityRefChecker Window and run commands. The RefCheckerTestComponent has the expected results as comments.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaydenjameslee%2Funity-reference-checker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhaydenjameslee%2Funity-reference-checker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaydenjameslee%2Funity-reference-checker/lists"}