Inspector ウィンドウを使って、ゲームオブジェクト、Unity コンポーネント、Assets、Materials、In-Editorの設定やプリファレンスなど、Unity エディターのほとんどすべてのもの (ゲームオブジェクト、Unity コンポーネント、アセット、マテリアル、エディター内設定、環境設定など) の プロパティと設定の表示編集 を行うことができます。
Inspector ウィンドウを開くには、以下のいずれかの操作を行います。
Inspector ウインドウは数に上限なく開くことができ、他のウインドウと同じように 再配置、ドッキング、サイズ変更 ができます。
デフォルトでは、Inspector ウィンドウは現在の選択範囲のプロパティを表示します。選択範囲が変更されると、Inspector のコンテンツも変更されます。現在の選択範囲にかかわらず、同じ一群のプロパティを開いておくには、以下のいずれかを実行します。
Inspector ウインドウで表示、編集できる内容は、選択した要素によって異なります。ここでは、選択可能な要素の種類に応じた Inspector ウインドウの表示内容について説明します。
Hierarchy や シーンビュー などでゲームオブジェクトを選択すると、Inspector には、そのゲームオブジェクトのすべてのコンポーネントとマテリアルのプロパティが表示されます。プロパティの編集 や コンポーネントの並び替え を Inspector ウィンドウで行うことができます。
ゲームオブジェクトにカスタムスクリプトコンポーネントがアタッチされている場合、Inspector にはスクリプトのパブリック変数が表示されます。スクリプトの変数は、他のプロパティと同じように編集することができます。つまり、コード変更することなく、スクリプトにパラメーターやデフォルト値を設定することができます。
詳しくは、スクリプト セクションの 変数と Inspectorを参照してください。
Project ウィンドウ などで アセット を選択すると、Inspector には、Unity がランタイムにアセットをどのようにインポートして使用するかを制御する設定が表示されます。
アセットの種類ごとにそれぞれの設定があります。例えば以下のアセットのインポート設定が Inspector ウィンドウで編集できます。
Project Settings (メニュー: Editor > Project Settings) を開くと、Inspector ウィンドウに表示されます。
プレハブを使用する際は、Inspector ウィンドウに追加的な情報とオプションが表示されます。これには例えば以下が含まれます。
Inspector ウィンドウでのプレハブの操作については、プレハブ のセクションを参照してください。
複数の要素が選択されている場合、それらが共通して持つすべてのプロパティを Inspector ウィンドウで編集できます。入力した値は、選択中のすべての要素にコピーされます。選択された要素の数も Inspector ウィンドウに表示されます。
複数のゲームオブジェクトを選択すると、共通のコンポーネントがすべて Inspector ウィンドウに表示されます。
同じ種類の複数のアセットを選択すると、それらに共通のすべてのプロパティが Inspector ウィンドウに表示されます。
種類の異なる複数のアセットを選択すると、Inspector に、それぞれのタイプのアセットの選択数を示すリストが表示されます。リスト内の任意の項目をクリックすると、そのタイプのすべてのアセットを確認できます。
複数のゲームオブジェクトを編集するときと同じように、選択された複数のプレハブのインスタンスを表示することができます。ただし、Inspector では Select、Revert、Apply ボタンが非表示になります (インスタンスを通したプレハブの編集 参照)。
Inspector ウィンドウでゲームオブジェクトやアセットを開くときは、Ping コマンドを使って、シーンビューや Project ウィンドウでそれらを見付けることができます。
Inspector ウィンドウの その他 (⋮) メニューから Ping を選択してください。Hierarchy ウィンドウや Project ウィンドウで、その要素が強調表示されます。
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.