{"id":13786493,"url":"https://github.com/baba-s/uni-common-test-runner","last_synced_at":"2025-04-12T02:52:24.541Z","repository":{"id":110294998,"uuid":"177371498","full_name":"baba-s/uni-common-test-runner","owner":"baba-s","description":"Unity Test Runner で実行できる汎用的なテストを 20 個以上まとめた Unity プロジェクト","archived":false,"fork":false,"pushed_at":"2019-11-21T03:03:51.000Z","size":39,"stargazers_count":26,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-25T22:36:26.540Z","etag":null,"topics":["kogane-unity-lib","unity","unity-test-runner","unity3d"],"latest_commit_sha":null,"homepage":"http://baba-s.hatenablog.com/entry/2019/03/25/090000","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/baba-s.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}},"created_at":"2019-03-24T04:43:22.000Z","updated_at":"2024-03-19T22:11:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"eb2d22c6-07fe-43c2-9a03-bc60ef2f4567","html_url":"https://github.com/baba-s/uni-common-test-runner","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baba-s%2Funi-common-test-runner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baba-s%2Funi-common-test-runner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baba-s%2Funi-common-test-runner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baba-s%2Funi-common-test-runner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/baba-s","download_url":"https://codeload.github.com/baba-s/uni-common-test-runner/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248509707,"owners_count":21116099,"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":["kogane-unity-lib","unity","unity-test-runner","unity3d"],"created_at":"2024-08-03T19:01:16.766Z","updated_at":"2025-04-12T02:52:24.511Z","avatar_url":"https://github.com/baba-s.png","language":"C#","readme":"# UniCommonTestRunner\n\nUnity Test Runner で実行できる汎用的なテストを 20 個以上まとめた Unity プロジェクト  \n\n[![](https://img.shields.io/github/release/baba-s/uni-common-test-runner.svg?label=latest%20version)](https://github.com/baba-s/uni-common-test-runner/releases)\n[![](https://img.shields.io/github/release-date/baba-s/uni-common-test-runner.svg)](https://github.com/baba-s/uni-common-test-runner/releases)\n![](https://img.shields.io/badge/Unity-2018.3%2B-red.svg)\n![](https://img.shields.io/badge/.NET-4.x-orange.svg)\n[![](https://img.shields.io/github/license/baba-s/uni-common-test-runner.svg)](https://github.com/baba-s/uni-common-test-runner/blob/master/LICENSE)\n\n# バージョン\n\n- Unity 2018.3.7f1\n\n# 使い方\n\n![](https://cdn-ak.f.st-hatena.com/images/fotolife/b/baba_s/20190324/20190324140848.png)\n\nUnity メニューの「Window \u003e General \u003e Test Runner」を選択して表示される  \n\n![](https://cdn-ak.f.st-hatena.com/images/fotolife/b/baba_s/20190324/20190324140859.png)\n\n「Test Runner」ウィンドウからテストを実行することができます  \n\n![](https://cdn-ak.f.st-hatena.com/images/fotolife/b/baba_s/20190324/20190324150831.png)\n\nテストに失敗した場合は、該当するシーンやゲームオブジェクトの名前が出力されます  \n\n![](https://cdn-ak.f.st-hatena.com/images/fotolife/b/baba_s/20190324/20190324141014.png)\n\nUnity メニューの「Tools \u003e UniCommonTestRunner」から  \n現在のシーンを対象にテストを実行することもできます  \n\n# 実行できるテストの種類\n\n## 加速度センサーが無効になっているか\n\n![](https://cdn-ak.f.st-hatena.com/images/fotolife/b/baba_s/20190324/20190324142201.png)\n\n加速度センサーを使用しないプロジェクトにおいて  \n加速度センサーが無効になっているかテストできます  \n\n- 関連記事\n    - http://baba-s.hatenablog.com/entry/2019/03/07/145949\n\n## Android 用のプラグインのプラットフォームが適切か\n\n![](https://cdn-ak.f.st-hatena.com/images/fotolife/b/baba_s/20190324/20190324142206.png)\n\n「Plugins」フォルダ内の「Android」フォルダに含まれているプラグインの  \n対象プラットフォームに iOS が設定されていないかどうかテストできます  \n\n- 参考サイト様\n    - https://pimdewitte.me/2016/11/03/optimizing-ios-builds-in-unity-a-tutorial-for-getting-under-the-100mb-over-the-air-download-limit-on-the-app-store/\n    - https://answers.unity.com/questions/1187539/why-does-unity-54-include-the-contents-of-pluginsa.html\n\n## Animator Controller の Motion が null になっていないか\n\n![](https://cdn-ak.f.st-hatena.com/images/fotolife/b/baba_s/20190324/20190324142213.png)\n\nAnimator Controller の中のいずれかのステートの Motion が  \nnull になっていないかどうかテストできます  \n\n## Audio Listener が存在しないか\n\n![](https://cdn-ak.f.st-hatena.com/images/fotolife/b/baba_s/20190324/20190324142219.png)\n\nCRI のようなサウンドミドルウェアを使用しているプロジェクトで  \nAudio Listener が使用されていないかどうかテストできます  \n\n## Audio Listener が複数存在しないか\n\n![](https://cdn-ak.f.st-hatena.com/images/fotolife/b/baba_s/20190324/20190324142225.png)\n\nUnity 標準のオーディオ機能を使用しているプロジェクトで  \nAudio Listener が1つのシーンに複数存在しないかどうかテストできます  \n\n## 2D のカメラのパラメータが統一されているか\n\n![](https://cdn-ak.f.st-hatena.com/images/fotolife/b/baba_s/20190324/20190324142543.png)\n\n2D のプロジェクトにおいてすべてのシーンの  \nカメラのパラメータが統一されているかどうかテストできます  \n\n## Canvas にカメラが設定されているか\n\n![](https://cdn-ak.f.st-hatena.com/images/fotolife/b/baba_s/20190324/20190324142548.png)\n\nRender Mode が「Screen Space - Camera」や「World Space」になっている Canvas に  \nカメラが設定されているかどうかテストできます  \n\n## 透明な UI オブジェクトの\u003cbr /\u003eCull Transparent Mesh がオンになっているか\n\n![](https://cdn-ak.f.st-hatena.com/images/fotolife/b/baba_s/20190324/20190324142552.png)\n\n表示する必要のない透明な UI オブジェクトの Canvas Renderer の  \nCull Transparent Mesh がオンになっているかどうかテストできます  \n\n- 関連記事\n    - http://baba-s.hatenablog.com/entry/2019/03/18/152500\n\n## Canvas Scaler のパラメータが統一されているか\n\n![](https://cdn-ak.f.st-hatena.com/images/fotolife/b/baba_s/20190324/20190324142601.png)\n\nすべてのシーンの Canvas Scaler の解像度の設定が  \n統一されているかどうかテストできます  \n\n## DisallowMultipleComponent 属性が適用されている\u003cbr /\u003eコンポーネントが複数アタッチされていないか\n\n```cs\nusing UnityEngine;\n\n[DisallowMultipleComponent]\npublic class Example : MonoBehaviour\n{\n}\n```\n\nDisallowMultipleComponent 属性が適用されているコンポーネントが  \n1つのゲームオブジェクトに複数アタッチされていないかどうかテストできます  \n\n## EventSystem の Drag Threshold が統一されているか\n\n![](https://cdn-ak.f.st-hatena.com/images/fotolife/b/baba_s/20190324/20190324143231.png)\n\nすべてのシーンの EventSystem の Drag Threshold の値が  \n統一されているかどうかテストできます  \n（シーンによって ScrollRect の操作性が相違していないか確認できます）  \n\n## 2D のシーンで GI が無効になっているか\n\n![](https://cdn-ak.f.st-hatena.com/images/fotolife/b/baba_s/20190324/20190324143239.png)\n\n2D のシーンでグローバルイルミネーションの機能が  \n無効になっているかどうかテストできます  \n\n- 関連記事\n    - http://baba-s.hatenablog.com/entry/2019/03/06/141858\n    - http://baba-s.hatenablog.com/entry/2019/03/06/143028\n    - http://baba-s.hatenablog.com/entry/2019/03/06/143224\n\n## iOS 用のプラグインのプラットフォームが適切か\n\n![](https://cdn-ak.f.st-hatena.com/images/fotolife/b/baba_s/20190324/20190324143245.png)\n\n「Plugins」フォルダ内の「iOS」フォルダに含まれているプラグインの  \n対象プラットフォームに Android が設定されていないかどうかテストできます  \n\n## モバイル用のシェーダがマテリアルに設定されているか\n\n![](https://cdn-ak.f.st-hatena.com/images/fotolife/b/baba_s/20190324/20190324143250.png)\n\nUnity 標準の軽量なモバイルシェーダに置き換えられるシェーダが  \n使用されているマテリアルが存在しないかどうかテストできます  \n\n- 参考サイト様\n    - https://docs.unity3d.com/jp/current/Manual/shader-Performance.html\n\n## Missing Prefab になっているオブジェクトが存在しないか\n\n![](https://cdn-ak.f.st-hatena.com/images/fotolife/b/baba_s/20190324/20190324143258.png)\n\n生成元のプレハブが削除されたゲームオブジェクトが  \n存在しないかどうかテストできます  \n\n## Missing になっている参照が存在しないか\n\n![](https://cdn-ak.f.st-hatena.com/images/fotolife/b/baba_s/20190324/20190324143308.png)\n\n存在しないアセットやオブジェクトの参照が設定されている  \nパラメータが存在しないかどうかテストできます  \n\n## Missing Script が存在しないか\n\n![](https://cdn-ak.f.st-hatena.com/images/fotolife/b/baba_s/20190324/20190324143315.png)\n\n存在しないスクリプトや名前が正しくないスクリプトがアタッチされている  \nゲームオブジェクトが存在しないかどうかテストできます  \n\n## Odin の Required 属性が適用されている変数に\u003cbr /\u003e参照が設定されているか\n\n```cs\nusing Sirenix.OdinInspector;\nusing UnityEngine;\n\npublic class Example : MonoBehaviour\n{\n    [Required] public GameObject go;\n}\n```\n\nOdin の Required 属性が適用されている変数に  \n参照が設定されているかどうかテストできます  \n\n## OnlyOneInScene 属性が適用されている\u003cbr /\u003eコンポーネントがシーンに 1つだけかどうか\n\n```cs\nusing UnityEngine;\n\n[OnlyOneInScene]\npublic class Example : MonoBehaviour\n{\n}\n```\n\nOnlyOneInScene 属性が適用されているコンポーネントが  \nシーンに1つしか存在しないかどうかテストできます  \n\n## RectTransform の Position が整数になっているか\n\n![](https://cdn-ak.f.st-hatena.com/images/fotolife/b/baba_s/20190324/20190324143711.png)\n\nRectTransform の Position に浮動小数点以下が設定されており  \n画像がボヤケて表示されていないかどうかテストできます  \n\n## RectTransform の Scale が整数になっているか\n\nRectTransform の Scale に浮動小数点以下が設定されており  \n画像がボヤケて表示されていないかどうかテストできます  \n\n![](https://cdn-ak.f.st-hatena.com/images/fotolife/b/baba_s/20190324/20190324143716.png)\n\n## TextMeshProUGUI の Raycast Target がオフになっているか\n\n![](https://cdn-ak.f.st-hatena.com/images/fotolife/b/baba_s/20190324/20190324143721.png)\n\nクリックできる必要のない TextMeshProUGUI オブジェクトの  \nRaycast Target がオフになっているかどうかテストできます  \n\n- 関連記事\n    - http://baba-s.hatenablog.com/entry/2019/03/06/120002\n\n## UI.Text の Raycast Target がオフになっているか\n\n![](https://cdn-ak.f.st-hatena.com/images/fotolife/b/baba_s/20190324/20190324143728.png)\n\nクリックできる必要のない UI.Text オブジェクトの  \nRaycast Target がオフになっているかどうかテストできます  \n\n- 関連記事\n    - http://baba-s.hatenablog.com/entry/2017/12/19/090000\n    - http://baba-s.hatenablog.com/entry/2017/12/26/130900\n\n# 補足\n\n「UniCommonTestRunner」は、あくまでも  \n汎用的に使えそうなテストをまとめただけのプロジェクトであり、  \n一部のテストはそのままだと使えない、意図した結果にならないことが想定されます  \n\n（例えば CRI を使用していることを前提としているテストが含まれています）  \n\n「UniCommonTestRunner」を使用する場合は  \n意図した結果にならないテストは修正や削除していただければと思います  ","funding_links":[],"categories":["Static Code Analysis"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbaba-s%2Funi-common-test-runner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbaba-s%2Funi-common-test-runner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbaba-s%2Funi-common-test-runner/lists"}