Use the Hierarchy Search Provider to find GameObjects in the current SceneA Scene contains the environments and menus of your game. Think of each unique Scene file as a unique level. In each Scene, you place your environments, obstacles, and decorations, essentially designing and building your game in pieces. More info
See in Glossary.
Hierarchy queries run on all objects of the current scene. For this search, Unity uses progressive caching, not indexed data (as opposed to AssetAny media or data that can be used in your game or project. An asset may come from a file created outside of Unity, such as a 3D Model, an audio file or an image. You can also create some asset types in Unity, such as an Animator Controller, an Audio Mixer or a Render Texture. More info
See in Glossary and ObjectsThe fundamental object in Unity scenes, which can represent characters, props, scenery, cameras, waypoints, and more. A GameObject’s functionality is defined by the Components attached to it. More info
See in Glossary providers).
From the More(⋮) menu, select Show more results to enable “fuzzy” search in the Hierarchy Search Provider. Fuzzy searches are more resource intensive than direct searches, but usually return more matches. They can be slower in larger Scenes and may cause a lag.
Search token: h:
(for “hierarchy”)
Default action: Select the GameObject in the Scene.
Action: | Function: |
---|---|
Select | Selects the GameObject in the Scene and the Hierarchy window. |
Open | Opens the Project Asset that contains the GameObject. |
Hide/Show | Hides/Shows the GameObject in the Scene viewAn interactive view into the world you are creating. You use the Scene View to select and position scenery, characters, cameras, lights, and all other types of Game Object. More info See in Glossary. |
Hierarchy Search Provider
Use these tokens to further limit your Hierarchy searches.
Filter | Search token | Description |
---|---|---|
Component type | t: |
t:collid Searches all GameObjects that have a component containing the word collid (ex: Collider, Collider2d, MyCustomCollider). |
Instance id | id: |
id :210 Searches all GameObjects whose instanceID contains the word 210 (ex: 21064). id=21064 Searches all GameObjects whose instanceID is exactly 21064. |
Path | path:parent/to/child |
path:Wall5/Br Searches all GameObjects whose path matches the partial path Wall5/Br (e.g.: /Structures/Wall5/Brick)path=/Structures/Wall5/Brick Searches all GameObjects with a scene path that is exactly /Structures/Wall5/Brick. |
Tag | tag: |
tag:resp Searches all GameObjects that have a tag containing the word resp (e.g.: Respawn) |
Layer | layer:<layer number> |
layer:8 Searches all GameObjects that are on layer 8 (e.g.: 8: Terrain) |
Size | size:number |
size>5 Searches all GameObjects with an AABB volume size larger than 5. |
Overlap | overlap:number |
overlap>3 Searches all GameObjects that renderer bounds intersects with more than 3 other GameObjects. |
Dependencies | ref:<asset name> |
ref:stone Searches all GameObjects and their components that have a dependency on an asset whose name contains the word stone |
Child | is:child |
is:child Searches all GameObjects that are the child of a GameObject. |
Leaf | is:leaf |
is:leaf Searches all GameObjects that don’t have a child. |
Root | is:root |
is:root Searches all GameObjects that don’t have a parent (i.e. that root objects in the scene). |
Visible | is:visible |
is:visible Searches all GameObjects that are visible by the camera of the Scene View. |
Hidden | is:hidden |
is:hidden Searches all GameObjects that are hidden according to the SceneVisibilityManager. |
Static | is:static |
is:static Searches all GameObjects that are static. |
Prefab | is:prefab |
is:prefab Searches all GameObjects that are part of a Prefab. |
You can use the special p(<partial propertyname>)
syntax to filter objects according to the value of a property in order to match the partial name of the property against any of the components of an object. This is a dynamic operation that doesn’t use an index. Here are some examples of queries using p()
:
p(drawmode)=Simple |
Matches the drawmode property of a SpriteA 2D graphic objects. If you are used to working in 3D, Sprites are essentially just standard textures but there are special techniques for combining and managing sprite textures for efficiency and convenience during development. More infoSee in Glossary renderer. |
p(orthographic size)>2 |
Matches a Camera with an orthographic size higher than 2. |
p(istrigger)=false |
Matches all GameObjects where the IsTrigger property in a Collider2d is NOT a trigger. |
p(sprite)=bee |
Matches all GameObjects with a Sprite property (e.g.: Sprite Renderer) that links to an Asset whose name is exactly bee . |
p(sprite):bee |
Matches all GameObjects with a Sprite property (e.g.: Sprite Renderer) that links to a GameObject with a name containing the word bee . |
p(spri):bee |
Matches all GameObjects with a property containing the word spri (such as the Sprite property of a Sprite Renderer component) that links to a GameObject Asset with a name containing the word bee . |
Unity indexes property names according to their internal name, which might be different than the display name in the InspectorA Unity window that displays information about the currently selected GameObject, asset or project settings, allowing you to inspect and edit the values. More info
See in Glossary.
To find the internal name of a property, check the Inspector in Debug mode.
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.
When you visit any website, it may store or retrieve information on your browser, mostly in the form of cookies. This information might be about you, your preferences or your device and is mostly used to make the site work as you expect it to. The information does not usually directly identify you, but it can give you a more personalized web experience. Because we respect your right to privacy, you can choose not to allow some types of cookies. Click on the different category headings to find out more and change our default settings. However, blocking some types of cookies may impact your experience of the site and the services we are able to offer.
More information
These cookies enable the website to provide enhanced functionality and personalisation. They may be set by us or by third party providers whose services we have added to our pages. If you do not allow these cookies then some or all of these services may not function properly.
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us to know which pages are the most and least popular and see how visitors move around the site. All information these cookies collect is aggregated and therefore anonymous. If you do not allow these cookies we will not know when you have visited our site, and will not be able to monitor its performance.
These cookies may be set through our site by our advertising partners. They may be used by those companies to build a profile of your interests and show you relevant adverts on other sites. They do not store directly personal information, but are based on uniquely identifying your browser and internet device. If you do not allow these cookies, you will experience less targeted advertising. Some 3rd party video providers do not allow video views without targeting cookies. If you are experiencing difficulty viewing a video, you will need to set your cookie preferences for targeting to yes if you wish to view videos from these providers. Unity does not control this.
These cookies are necessary for the website to function and cannot be switched off in our systems. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms. You can set your browser to block or alert you about these cookies, but some parts of the site will not then work. These cookies do not store any personally identifiable information.