{"id":13786488,"url":"https://github.com/uken/mooble","last_synced_at":"2026-01-20T03:04:38.296Z","repository":{"id":146995737,"uuid":"73937285","full_name":"uken/mooble","owner":"uken","description":"Static Analysis For Unity Scenes \u0026 Prefabs","archived":false,"fork":false,"pushed_at":"2024-12-06T17:59:03.000Z","size":139,"stargazers_count":49,"open_issues_count":2,"forks_count":3,"subscribers_count":19,"default_branch":"master","last_synced_at":"2025-05-11T22:38:00.703Z","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/uken.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,"zenodo":null}},"created_at":"2016-11-16T16:11:31.000Z","updated_at":"2024-12-06T17:59:03.000Z","dependencies_parsed_at":"2024-01-17T05:49:42.770Z","dependency_job_id":"6a00d15d-154e-45f8-b164-3af5dc93f2da","html_url":"https://github.com/uken/mooble","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/uken/mooble","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uken%2Fmooble","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uken%2Fmooble/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uken%2Fmooble/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uken%2Fmooble/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/uken","download_url":"https://codeload.github.com/uken/mooble/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uken%2Fmooble/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28594958,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T02:08:49.799Z","status":"ssl_error","status_checked_at":"2026-01-20T02:08:44.148Z","response_time":117,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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-08-03T19:01:16.679Z","updated_at":"2026-01-20T03:04:38.280Z","avatar_url":"https://github.com/uken.png","language":"C#","readme":"# Mooble\n\n## Acknowledgments\n\nThis project was created by @kgooble and @elmoeleven during one of Uken's 2016 Hadoukathons\n\n## Static Analysis\n\nMooble provides tools to perform static analysis on prefabs and scene files -\noften unchecked in code review and hard to test without someone running the\nscene and going through every possible flow. Mooble's goal is to help catch\nerrors ahead of time by checking for common errors in scene and prefab files,\nand allowing you to customize the static analysis by writing your own rules.\n\n## Getting Started\n\nAll it takes to get started with Mooble is to drop the Mooble directory into \n`Assets/Plugins` of your own project. Take a look at the sample project provided\n[here](https://github.com/kgooble/mooble-example-project) for an example.\n\n### Built-in Rules\n\n#### `NoDuplicateComponents`\n\nThis rule makes sure that `GameObjects` do not have two of the same type of\n`Component`, e.g.  no `GameObject` has two `Text` components, etc.\n\n#### `NoInactiveBehaviours`\n\nThis rule ensures that no\n[`Behaviour`](https://docs.unity3d.com/ScriptReference/Behaviour.html) is set to\ninactive. You can exclude certain types from this rule (i.e., allowing them to\nbe inactive in the scene or prefab) by specifying an `Exclusions` array in the\nconfiguration. See [config](# Configuration Options) for more details.\n\n#### `NoMissingComponents`\n\nThis rule ensures that all script components are not referencing missing\nscripts.  If your object has a component with a missing script reference,\nsomething has likely gone wrong!\n\n#### `NoMissingObjectReferences`\n\nThis rule outputs a warning if you have a\n[`MonoBehaviour`](https://docs.unity3d.com/ScriptReference/MonoBehaviour.html)\nwith unassigned `public` or `SerializeField` fields - i.e. those with `null`\nvalues. This can be a smell in that your script either has some unused code\nin it or it may be that your `MonoBehaviour` is overly general.\n\n### Writing Your Own Rules\n\nIn order to write your own rule, you need to implement the following classes:\n\n1. A class that implements `Rule\u003cT\u003e`, where `T` is the type of component you'd\n   like to validate (otherwise, `T` must be `GameObject`). Take a look at the\n   `Rule` file to see which abstract methods must be implemented.\n\n2. A class that implements `IViolation`. This is the type of violation that\n   your rule generates. Take a look at the interface in this repository to see\n   which methods it must implement.\n\nAfter you have implemented the class, add an entry to `moobleconfig.json` for\nthat class. The class name must be fully namespaced. You must also provide the\nassembly name which you can find out by running the following code locally:\n\n```csharp\nusing System;\nusing System.Reflection;\n\npublic class FindAssembly : MonoBehaviour {\n  private void Start() {\n    // SomeClass is a class in your project\n    Debug.Log(typeof(SomeClass).Assembly.GetName().Name);\n  }\n}\n```\n\nIn most cases it will be `\"Assembly-CSharp\"`.\n\n### Configuration Options\n\nAdd a `moobleconfig.json` file to your root project directory. This is the file\nthat the menu items look for when trying to determine what rules you want to\nrun over your scenes and prefabs. Take a look at the `moobleconfig.json` file\nprovided in this repository for an example.\n\nOnly rules listed in the `Rules` list will be run.\n\n#### Exclusions\n\nThe `IgnoredSceneRootObjectNames` property at the root level of the `moobleconfig.json`\nfile allows you to specify object names at the root level of scenes that should be ignored by Mooble.\nThis can be useful if you need to ignore certain prefabs that are from, say, 3rd party plugins.\n\nThe `Exclusions` list is to allow users to provide various types that the\nrule in question should _not_ run on. This type name must be qualified\nwith the full namespace and the assembly it belongs to. For example, if you\ndon't want to run the `NoInactiveBehaviours` rule on `Animator` behaviours,\nadd it to the exclusion list:\n\n```json\n\"Exclusions\": [ \"UnityEngine.Animator, UnityEngine\" ]\n```\n\nOther common assemblies include:\n* `Assembly-CSharp` for code in your project\n* `Assembly-CSharp-firstpass` for code in your plugins directory\n\nNot all rules accept `Exclusions` lists; take a look at the code for the\nspecific rule to check whether it accepts exclusions.\n\n### Build Integration\n\nYou can integrate Mooble with your Jenkins build by using the command line tools provided (see [CLI.cs](https://github.com/uken/mooble/blob/master/Assets/Plugins/Mooble/StaticAnalysis/CLI.cs)). You can run the command line static analysis tools by using Unity's batch mode. Make sure to close any open instances of Unity before you run the following:\n\n```bash\n/Applications/Unity/Unity.app/Contents/MacOS/Unity -quit -batchmode -projectPath ${WORKSPACE} -executeMethod Mooble.StaticAnalysis.CLI.RunPrefabAnalysis ${MOOBLE_PREFABS}\n```\n\n`${WORKSPACE}` is the location of the project that has integrated the Mooble plugin, and `${MOOBLE_PREFABS}` in this case is a space-delimited list of prefabs you want to run the prefab analysis on, e.g `Assets/Prefabs/A.prefab Assets/Prefabs/B.prefab Assets/Prefabs/MorePrefabs/C.prefab`.\n","funding_links":[],"categories":["Static Code Analysis"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuken%2Fmooble","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fuken%2Fmooble","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuken%2Fmooble/lists"}