Hierarchy 検索プロバイダーを使って、現在のシーンにあるゲームオブジェクトを検索します。
Hierarchy queries run on all objects of the current scene. For this search, Unity uses progressive caching, not indexed data.
検索トークン: h:
(“hierarchy” の h)
デフォルト動作: シーン内のゲームオブジェクトを選択します。
アクション | 機能 |
---|---|
Select | シーンと Hierarchy ウィンドウ内のゲームオブジェクトを選択します。 |
Open | ゲームオブジェクトが含まれるプロジェクトアセットを開きます。 |
Hide/Show | シーンビューのゲームオブジェクトを隠します/表示します。 |
Hierarchy 検索プロバイダー
これらのトークンを使用して、Hierarchy 検索をさらに制限することができます。
フィルター | 検索トークン | 説明 |
---|---|---|
コンポーネントタイプ | t: |
t:collid collid という単語を含むコンポーネント (例えば Collider、Collider2d、MyCustomCollider など) を持つすべてのゲームオブジェクトを検索します。 |
インスタンス ID | id: |
id :210 インスタンス ID に 210 (例えば 21064) を含むゲームオブジェクトを全て検索します。 id=21064 インスタンス ID が正確に 21064 であるゲームオブジェクトを全て検索します。 |
パス | path:parent/to/child |
path:Wall5/Br 部分パス Wall5/Br (例えば ctures/Wall5/Brick など) にパスの一部が一致するゲームオブジェクトを検索します。path=/Structures/Wall5/Brick シーンパスが正確に /Structures/Wall5/Brick であるゲームオブジェクトを全て検索します。 |
タグ | tag: |
tag:resp resp という語を含むタグ (例えば Respawn) を持つゲームオブジェクトをすべて検索します |
レイヤー | layer:<layer number> |
layer:8 レイヤー 8 (例えば 8: Terrain) にあるゲームオブジェクトを全て検索します。 |
サイズ | size:number |
size>5 AABB ボリュームサイズが 5 以上のゲームオブジェクトを全て検索します。 |
オーバーラップ | overlap:number |
overlap>3 レンダラー境界が 3 つ以上の他のゲームオブジェクトと交差しているゲームオブジェクトを全て検索します。 |
依存関係 | ref:<asset name> |
ref:stone 名前に stone という語を含むアセットに依存関係があるゲームオブジェクトとそのコンポーネントを全て検索します。 |
子 | is:child |
is:child 任意のゲームオブジェクトの子であるゲームオブジェクトをすべて検索します。 |
リーフ | is:leaf |
is:leaf 子を持たないゲームオブジェクトを全て検索します。 |
ルート | is:root |
is:root 親を持たないすべてのゲームオブジェクト (つまり、シーンのルートオブジェクト) を検索します。 |
可視 | is:visible |
is:visible シーンビューのカメラで見えるゲームオブジェクトを全て検索します。 |
隠れオブジェクト | is:hidden |
is:hidden SceneVisibilityManager に従って、隠れているゲームオブジェクトを全て検索します。 |
静止 | is:static |
is:static 静的なゲームオブジェクトを全て検索します。 |
プレハブ | is:prefab |
is:prefab プレハブに含まれる全てのゲームオブジェクトを検索します。 |
特別な p(<partial propertyname>)
構文を使用すると、プロパティ名の一部とオブジェクトのコンポーネントのいずれかとを照合するために、プロパティの値に従ってオブジェクトをフィルタリングします。これは、インデックスを使用しない動的な操作です。以下は、p()
を使用したクエリの例です。
p(drawmode)=Simple |
スプライトレンダラーの drawmode プロパティに一致します。 |
p(orthographic size)>2 |
2 以上の平行投影サイズを持つカメラに一致します。 |
p(istrigger)=false |
Collider2d の IsTrigger プロパティがトリガーではない全てのゲームオブジェクトに一致します。 |
p(sprite)=bee |
Sprite プロパティ (例えば Sprite Renderer) を持ち、名前が正確に bee であるアセットに紐づけられた全てのゲームオブジェクトに一致します。 |
p(sprite):bee |
Sprite プロパティ (例えば Sprite Renderer) を持ち、名前に bee という語が含まれるアセットに紐づけられた全てのゲームオブジェクトに一致します。 |
p(spri):bee |
spri という語を含むプロパティ (Sprite Renderer コンポーネントの Sprite プロパティなど) を持ち、bee という語を含む名前を持つゲームオブジェクトアセットに紐づけられたに全てのゲームオブジェクトに一致します。 |
Unity はプロパティの内部的な名前に従ってプロパティ名のインデックスを作成します。この内部名はInspector での表示名とは異なる場合があります。 プロパティの内部名を調べるには、デバッグモードで Inspector を確認します。
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.