はじめに
Dependency Viewerは選択したGameObjectやアセットの依存関係を調べることができる機能です。
The Dependency Viewer is a new prototype tool that is built on the Search ecosystem. The Dependency Viewer allows a user to always know the dependencies (both Uses and Used by) of any objects (GameObject or asset) that are currently selected. Also, the Dependency Viewer has a lot of useful reports that inform the user about their project: broken dependencies, missing assets, most used assets, etc.
// DeepL翻訳
Dependency Viewerは、Searchエコシステム上に構築された、新しいプロトタイプツールです。Dependency Viewer は、現在選択されているオブジェクト(GameObject またはアセット)の依存関係(Uses と Used by の両方)を常に知ることができます。また、依存関係ビューアには、壊れた依存関係、不足しているアセット、最も使用されているアセットなど、プロジェクトについてユーザーに知らせる便利なレポートが多数用意されています。
Dependency Viewer · Unity-Technologies/com.unity.search.extensions Wiki · GitHub

Dependency ViewerはSearch Extensionsという公式パッケージに同梱されている機能になります。
This package contains a bunch of tools, examples, samples and queries to be used with Unity Search.
// DeepL翻訳
本パッケージには、Unity Searchで使用するツール、例、サンプル、クエリーが多数含まれています。
https://github.com/Unity-Technologies/com.unity.search.extensions#if-you-are-on-203
もう少し深掘りするとSearch ExtensionsはUnity Searchの拡張パッケージになっています。
少しややこしいですが、今回はUnity Searchの拡張パッケージであるSearch Extensionsの一機能であるDependency Viewerについて取り上げていきます。
対応バージョン
- Unity 2020.3
- Unity 2021.2 and more
インストール
Unity2020.3
PackageMangaerでcom.unity.quicksearch@3.0.0-preview.22をまずインストールする必要があります。
以下公式ドキュメントに詳細が載っているので、こちらの記事の該当箇所を参照してください。
github.com
この作業が終われば、Unity2021.2 or newerと同様な操作を行えばOKです。
Unity2021.2 or newer
PackageManagerを開きInstall package from git URL...のところに、https://github.com/Unity-Technologies/com.unity.search.extensions.git?path=packageと入力します。

無事にインストールすることができれば以下のような表示になっているはずです。

使い方
Dependency Viewer
メニューバーよりWindow -> Search -> Dependency Viewerを選択すると、Dependency Viewerウィンドウが立ち上がります。

このウィンドウが立ち上がっている状態でGameObjectまたはアセットを選択すると、依存元と依存先の一覧が表示されます。

使い方の詳細は以下の公式Wikiに記載されています。
github.com
Dependency Graph Viewer
Dependency Viewerを視覚的に分かりやすくグラフ表示しれくてるDependency Graph Viewerなるものもあります。
メニューバーのWindow -> Search -> Dependency Graph Viewerを選択することでDependency Graphウィンドウが立ち上がります。

こちらはProjectビュー上のアセットのみ対応されているよう(要確認)でした。
アセットをDependency Graphウィンドウにドラッグ&ドロップすると依存関係を表したグラフが表示されます。

Dependency Databaseの更新
ディスク上のアセットが変更されても自動で更新がされないので、手動で更新してあげる必要があります。
メニューバーのWindow -> Search -> Rebuild Dependency Indexを選択すればOKです。

参考
GitHub - Unity-Technologies/com.unity.search.extensions: This package contains a bunch of examples, samples and queries to be used with Unity Search.
Dependency Viewer · Unity-Technologies/com.unity.search.extensions Wiki · GitHub
Dependency Viewer · Unity-Technologies/com.unity.search.extensions Wiki · GitHub