Skip to content

search syntax

Sebastien Phaneuf edited this page Dec 17, 2021 · 1 revision

The Great QuickSearch Syntax Cheat Sheet

Provider Identifier token

By default QuickSearch will use all the Search Providers that are enabled in the Filter Window. If you want to limit your search to a single provider you can begin your search with a specific provider identifier token:

Filter Search
token
Description
Projects (or assets) p: p: asteroid
Searches for all assets containing the word asteroid in their name.
Hierarchy (or scene) h: h: asteroid
Searches current scene for game objects containing the word asteroid in their name.
Objects (prefab or indexed scenes) o: See Object Provider for detailed description.

o: asteroid
Searches all indexed scenes or prefabs for game objects containing the word asteroid in their name.
Menu me: me: test ru
Searches all menus for items containing the word test and the word ru (ex: Test Runner)
Settings se: se: quick
Searches all preferences or project settings for sections containing the word quick (ex: QuickSearch preferences).
Help ? <search topic> ?
Prints all sorts of search topic.
Calculator =<mathematical expression> =78/2*33
Prints the result of a computation.
Static C# API # # applica
Searches for static C# properties or functions taking no parameters containing the word applica (ex: EditorApplication.applicationContentsPath)
Packages pkg: pkg: quick
Searches the package registry for packages containing the word quick (ex: QuickSearch).
store store: store: bolt
Searches the Unity Asset Store for assets containing the word bolt.
Resources (loaded objects) res: res: quick
Searches all in memory objects containing the word quick (ex: quickSearch Editor Window).
Queries q: q: enemies
Searches all Search Query assets containing the word enemies.
Log log: log: adaptative
Searches the current Editor log for the word adaptative.

Query Engine Operators

Most QuickSearch providers are using a QueryEngine (Scene, Asset, Objects and Resource providers) to parse and resolve their queries. This means they support a basic set of Query Operators that allows for more complex queries using boolean operators and parentheses grouping:

A note on casing: most Quicksearch query ignore casing. Which means Stone or stone or sToNe will yield the same results.

Filter Search
token
Description
Basic search <any partial name> main
Searches all objects matching the word Main
And and Main and t:camera
Search all objects where name contains Main and is of type name containing camera

t:texture and jpg
Searches all objects of type texture containing jpg in their filename.

Note that since and is the default operator of the QueryEngine the last query is equivalent to:
t:texture jpg
or or Player or Monster
Searches all objects containing the word Player or Monster.
Group (<group content>) t:Character and (status=Poison or status=Stunned)
Searches all objects with a Character component where the value of status property is either Poison or Stunned.
Exclusion -<Expression to exclude> p: dep:door -t:Scene
Searches all all assets with a dependency on an asset containing the word door and that are not of type Scene.

p: dep:door -stone
Searches all all assets with a dependency on an asset containing the word door and that do not contain the word stone.
Exact Operator !<something> Most of the string matching in QuickSearch is done partially. When using the ! operator you expect exact matching.

p: stone
Searches all assets containing the word stone (stone_hammer.png, stone_door.prefab).

p: !stone
Searches all assets whose name is exactly stone (ex: stone.png)
Partial Value match (:) property:<partial value> ref:aster
Since : is used, searches all assets having an asset containing the word aster (ex: asteroid2, asteroids) as a dependency.
Exact Value (=) property=exactValue ref:aster
Since = is used, searches all assets having an asset named exactly asteroid as a dependency.
> property>number t:texture size>256
Searches all textures with a size bigger than 256 bytes.
< property<number t:texture size<256
Searches all textures with a size smaller than 256 bytes.
!= property!=number t:texture size!=256
Searches all textures with a size different than 256 bytes.
>= property>=number t:texture size>=256
Searches all textures with a size bigger or equal than 256 bytes.
<>= property>number t:texture size<=256
Searches all textures with a size smaller or equal than 256 bytes.

Scene Provider

Scene queries are run on all objects of the current scene. We do progressive caching so running the same query will be faster the next time. Note: these queries do not use indexed data (as opposed to Asset and Objects providers).

Filter Search
token
Description
Component type t: t:collid
Searches all game objects who have a component containing the word collid (ex: Collider, Collider2d, MyCustomCollider).
Instance id id: id:210
Searches all game objects whose instanceID contains the word 210 (ex: 21064).

id=21064
Searches all game objects whose instanceID is exactly 21064.
Path path:parent/to/child path:Wall5/Br
Searches all game objects whose path matches the partial path Wall5/Br (ex: /Structures/Wall5/Brick)

path=/Structures/Wall5/Brick.
Searches all game objects whose scene path is exactly /Structures/Wall5/Brick.
Tag tag: tag:resp
Searches all game objects who have a tag containing the word resp (ex: Respawn)
Layer layer:<layer number> layer:8
Searches all game objects who are on layer 8 (ex: 8: Terrain )
Size size:number size>5
Searches all game objects whose AABB volume size is bigger than 5.
Overlap overlap:number overlap>3
Searches all game objects whose renderer bounds intersects with more than 3 other game objects.
Dependencies ref:<asset name> ref:stone
Searches all game objects and their components who have a dependency on an asset whose name contains the word stone
Child is:child is:child
Searches all game objects who are the child of a game object.
Leaf is:leaf is:leaf
Searches all game objects who don't have a child.
Root is:root is:root
Searches all game objects who don't have a parent (i.e. that root objects in the scene).
Visible is:visible is:visible
Searches all game objects who are visible by the camera of the Scene View.
Hidden is:hidden is:hidden
Searches all game objects who are hidden according to the SceneVisibilityManager.
Static is:static is:static
Searches all game objects who are static.
Prefab is:prefab is:prefab
Searches all game objects who are part of a prefab.

Prefab Filters

If you want to query prefab object you can use these specific filter predicates:

Filter Search
token
Description
Root prefab prefab:root prefab:root
Searches all game objects who are a prefab root.
Top prefab prefab:top prefab:top
Searches all game objects who are part of a prefab instance.
Non asset prefab prefab:nonasset prefab:nonasset
Searches all game objects who are part of a prefab that is not insided a prefab asset.
Asset prefab prefab:asset prefab:asset
Searches all game objects who are part of a prefab asset.
Any prefab prefab:any prefab:any
Searches all game objects who are part of a prefab.
Model prefab prefab:model prefab:model
Searches all game objects who are part of a model prefab.
Regular prefab prefab:regular prefab:regular
Searches all game objects who are part of a regular prefab instance or asset.
Variant prefab prefab:variant prefab:variant
Searches all game objects who are part of a prefab variant.
Modified prefab prefab:modified prefab:modified
Searches all game objects who are a prefab instance with overrides.
Altered prefab prefab:altered prefab:altered
Searches all game objects who are a prefab instance with overrides even on default overrides.

Scene Property Search

You can use the special p(<partial propertyname>) syntax to filter objects according to the value of a property. We will try to match the partial name of the property against any of the components of an object. Note that we chose the syntax with p() to indicate this is a dynamic operation that loops over properties of object and that doesn’t use an index. Here are some examples of queries using p():

  • p(drawmode)=Simple Will match against the drawmode property of a Sprite renderer.
  • p(orthographic size)>2 Will match Camera with Orthographic size higher than 2.
  • p(istrigger)=false Will match all objects where the IsTrigger property in a Collider2d is NOT a trigger.
  • p(sprite)=bee Matches all GameObjects with a sprite property (ex: Sprite Renderer) that links to an asset whose name is exactly bee.
  • p(sprite):bee Matches all GameObjects with a sprite property (ex: Sprite Renderer) that links to an object with a name containing the word bee.
  • p(spri):bee Matches all GameObjects with a property containing the word spri (the sprite property of a Sprite Renderer component) that links to an object asset with a name containing the word bee.

Notes on property name

  • Currently we index property name according to their "internal" name which might be different than the display name in the Inspector.
  • You can always check the Inspector in debug mode to find the internal name of a property.

Asset Provider

The Asset provider uses an Asset index to search efficiently. When creating an index you can choose how much of your data you want to have indexed using the Indexing Options (see Index Manager.)

File Filters

Filter Search
token
Description
Default Search <search term> Searches term attempting to match agains the asset name, type or path.

texture
Searches all assets whose name or path or type contains the word texture.
Name name: name:laser
Searches all assets who contains the word laser.

name=laserbeam
Searches all assets where the name is exactly laserbeam.
Directory dir:<directory exact name> dir:Scripts
Searches all assets contained in a directory named exactly Scripts.
Packages a:packages a:packages texture
Searches all textures in any packages.
Project a:assets a:assets texture
Searches all textures in the current project (i.e. in the Assets folder).
Index file a:<index name> a:psd_textures texture
Assuming I have an index file named psd_textures.index in my project, Searches all textures in that index.
Size size:<number of bytes> size:4000 texture
Searches all textures over 4000 bytes (4KB).
Extension ext:<file extension without dots> ext:png texture
Searches all textures with the png extension.
Age age:<number of days since last modification> age<3 texture
Searches all textures that were modified in the last 3 days.

Find Filters

The Asset provider will use the Find provider to run a multithreaded search directly on the file system (note that this search doesn't use indexed data). The Find search is done only on file path (and not on their content) and allows to search using Regex or Glob patterns.

Filter Search
token
Description
Glob p:<glob query> p:Assets/*/*.png
Searches for all assets paths under the Assets folder and ending in .png. Note that it is equivalent to running find:Assets/**/*.png since it uses the Find provider under the hood.
Regex p:<C# regex pattern> p:(.*\/)+.+\s.+
Find all paths with a space in their name. Note that it is equivalent to running find:(.*\/)+.+\s.+ since it uses the Find provider under the hood.

See the Find provider for more information.

Type Filters

These filters are available if the index uses the Types Indexing option (See IndexManager).

Filter Search
token
Description
Type t:<Asset Type> t:texture
Searches all assets containing texture in their type name (ex: Texture2D, Texture).

t:prefab
Searches all prefab assets.
Type <Asset Type> Note that since we index all type name it is possible to search asset by type without using the t: filter above.

texture
Searches all assets containing texture in their type name (ex: Texture2D, Texture) or in their name (ex: myTexture.png).

prefab
Searches all prefab assets or assets with `prefab in their name.
File t:file t:file level1
Searches all files assets containing the word level1.
Folder t:folder t:folder
Searches all folders assets.

Indexed Property Search

Searching properties is available if the index has been specified with the Properties Indexing option (see IndexManager). A few remark regarding properties:

  • We are improving autocompletion of properties of assets but if you want to look at the list of all indexed properties check the Index Manager Keywords tab.
  • All property values are converted to string or number.
  • The name of the property has to be complete and not partial (case does not matter though).
  • We index properties of the top level object of a prefab asset. If you want all prefab hierarchies to be indexed create a Prefab Index (see Objects Provider below).
  • For .unity file we index the properties of the SceneAsset itself and not the scene content. If you want all scene contents to be indexed create a Scene Index (see Objects Provider below).
Filter Search
token
Description
Type t:<type> When using the Property indexing t: can be use to search for component type (on prefab) for asset type.

t:collider
Searches all prefabs containing a component with the word collider.

t:texture
Searches all asset whose type contains the word texture (ex: Texture or Texture2D).
Has Component has:<component type> has:collider
Searches all prefabs containing a component with the word collider.

has=BoxCollider
Searches all prefabs containing a component exactly called BoxCollider.
Label l:<label name> l:archi
Searches all assets with a label containing the word archi (Ex: Architecture).

l=Wall
Searches all assets with a label that is exactly Wall

All properties of an asset (prefab or other types) are indexed and searchable. Here are a few examples of property query:

Filter Search
token
Description
Number property:value bounciness>0.1
Searches all assets with a property named bounciness (ex: a PhysicsMaterial2D) higher than 0.1.

health=2
Searches all assets with a property named health (ex: HealthSystem Component of a prefab) with of a value of exactly 2.

t:texture filtermode!=0
Searches all textures with a filtermode property different than 0 (i.e different than Point).
Boolean property:value t:Dungeon generatePath=true
Searches all Dungeon ScriptableObject where the property generatePath is true.

isStunned=false
Searches all objects containing a property isStunned that is false.
String property:string value t:Character trait:indestru
Searches all prefab with a Character component whose trait property contains the word indestru (ex: indestructible).

t:Character trait="tough but fair"
Searches all prefab with a Character component whose trait property is exactly tough but fair.
Enum property:<enum value> characterclass:rog
Searches all objects with with a property named characterclass whose value contains the word rog (ex: value is rogue).

characterclass=FighterMage
Searches all objects with a property named characterclass with an exact value of FighterMage.
Color property:<html color value> color:ADA
Searches all objects with with a property named color where the color value starts with ADA (like ADADAD00).

color=ADADAD00
Searches all objects with with a property named color where the color value is exactly ADADAD00.

color=ADADAD
Searches all objects with with a property named color where the color value is exactly ADADAD and alpha value is 1.
Vector property.[xyzw]:value bounds.x>1
Searches all objects with with a property named bounds where the x value is bigger than 1.

acceleration.z=2
Searches all objects with with a property named acceleration where the z value is equal to 2
Object sprite:<object exact name> sprite:CharacterBody
Searches all assets with a sprite property (ex: Image Component of a prefab) that references an object whose name is CharacterBody.

Dependency Filters

If you are using the Dependencies Indexing option (See IndexManager) we index direct dependencies of all assets using AssetDatabase.GetDependencies.

Filter Search
token
Description
Reference Path ref:<asset full path> ref:assets/images/particles/p_smoke.png
Searches all assets with a direct dependencies on the exact asset path: assets/images/particles/p_smoke.png .
Reference Name ref:<asset name> ref:p_smo
Searches all assets with a direct dependencies on an asset whose name contains the word p_smo.

ref:p_smoke.png
Searches all assets with a direct dependencies on an asset whose name is p_smoke.png.

Objects Provider

The Object provider uses Prefab indexes or Scene indexes to search either prefab or scene hierarchies (all prefabs sub objects or all of a scene gameobjects) efficiently without having the scene or prefab loaded as the current scene. When setupping a Prefab or Scene index you can choose how much of your data you want to have indexed using the Indexing Options (see Index Manager).

Remark on Objects provider usage:

  • If you are already indexing your project with an Asset index and if all of your prefabs contain only a single object (no deep hierarchy) using a Prefab index is not necessary.
  • The Objects provider has some filters who are similar to the Scene provider (ex: tag:, layer:). Keep in mind though that Objects providers indexes the data and is not dynamic in the current scene (like the Scene provider).

Object provider supports the following set of filters (coming either from the Asset or Scene provider)

  • Objects provider supports Type filters.
  • Objects provider supports Prefabs filters.
  • Objects provider supports Properties search.
  • Objects provider supports Dependency filters.

Here are the filters that are made specifically for Objects. Note that some filters are similar to the [Scene Provider] filters. The difference is that Objects uses indexed data (so it allows for faster search) but doesn't support dynamic filter (ex: filter doing dynamic computation).

Filter Search
token
Description
Area a:<scene or prefab index name> a:MyPrefabIndex
Searches all gameobjects that are part of a prefab indexed by the MyPrefabIndex index.
Type t:<type> t:Image
Searches all gameobjects in an indexed prefab or scene hierarchy that have a component of type Image.
Depth depth:number depth=1
Searches all gameobjects in an indexed prefab or scene hierarchy that have a depth of 1 (i.e. root object in the hierarchy).

depth>1
Searches all gameobjects in an indexed prefab or scene hierarchy that are not root object.
From from:prefab from:prefab
Searches all gameobjects coming from Prefab indexes.
from:scene from:scene
Searches all gameobjects coming from Scene indexes.
Child is:child is:child
Searches all gameobjects who have a parent transform (are child of another gameobject).
Root is:root is:root
Searches all gameobjects who don't have a parent transform.
Leaf is:leaf is:leaf
Searches all gameobjects who don't have any children.
Layer layer:<layer number> layer:8
Searches all game objects who are on layer 8 (ex: 8: Terrain )
Tag tag: tag:resp
Searches all game objects who have a tag containing the word resp (ex: Respawn)
Prefab root prefab:root prefab:root
Searches all game objects who are the root of a prefab and use anywhere in a hierarchy.
Component count components:number components>3
Searches all game objects who have more than 3 components.

Resource provider

The Resource provider allows querying all objects that are currently in memory for the editor. You can access GameObjects, Assets, Editor Windows, etc. Basically anything deriving from Unity.Object.

Note that to query this provider you need to explicitly add res: to the query.

Filter Search
token
Description
Type t:<type> res: t:texture
Searches all loaded resources, and returns Texture type resources only.

res: t:inspector
Searches all loaded resources, and returns objects that contains the word inspector in their type (ex: UnityEditor.InspectorWindow, UnityEditor.GenericInspector).
Name n:name res: n:inspectorwindow
Searches all loaded resources and returns objects with the word window in their name (ex: InspectorWindow MonoScript, ConsoleWindow Icon).
ID id:number res: id:-15
Searches all loaded resources and returns the ones whose instance IDs begin with -15.
Tag tag:value res: tag:Untagged
Searches all loaded resources and returns the ones with no tag.

Asset Store provider

This provider can query the Unity Asset Store.

Note that to query this provider you need to explicitly add store: to the query.

Filter Search
token
Description
Minimum price min_price:number store: min_price:5 bolt
Searches the asset store for assets with a minimum price of 5$ and the word bolt in their name.
Maximum price max_price:number store: max_price:5 bolt
Searches the asset store for assets with a maximum price of 5$ and the word bolt in their name.
Publisher publisher:name store: publisher:Gargore
Searches the asset store for assets published by the company Gargore. Note that the publisher name must be exact.
Version version:number store: version:2017
Searches the asset store for assets that minimally supports Unity 2017.
Free free:boolean store: free:true asteroid
Searches the asset store for assets that are free and that have the word asteroid in their name.
On sale on_sale:boolean store: on_sale:true max_price:5
Searches the asset store for assets that are on sale and that have a max price of 5$.

Calculator

This provider allows for quick computation using a set of simple arithmetic operators.

Note that to query this provider you need to explicitly add = to the query.

Filter Search
token
Description
Supported operators + - * / % ^ ( ) =42/34 + (56 % 6)

=23 * 9 ^ 3

Find

The find provider runs a multithread asynchronous search on the filesystem to find files that match a specific pattern. The find provider doesn't rely on an actual index (contrary to the Asset Provider) which means you can use it even if your project has no indexes setup.

Note that to query this provider explicitly by adding find: to the query. Alternatively, all queries processed by the Asset provider will also try to run a find query.

Find does multiple searches at the same time:

  • Your search query can contain a C# Regex, it will be used to perform matching.
  • Your search query can contain glob expression with the following wildcards. Note that a glob expression is converted to a normal regex using the equivalency described in the table below:
Glob Wildcards Description Example Matches Does not match Equivalent Regex
* matches any number of any characters including none Law* Law,Laws, Lawyer Groklaw, La, aw .*
. matches any single of any characters including none Law* Law,Laws, Lawyer Groklaw, La, aw .

Filter Search
token
Description
Word search find:<query> find:Paint Mat
Searches for all assets paths containing the words paint AND the word mat (ex: PaintBrush_Mat.mat, DryWallPainted_Mat.mat)
Glob find:<glob query> find:Assets/*/*.png
Searches for all assets paths under the Assets folder and ending in .png.

find:Editor/*.cs
Searches for all C# files under any Editor folder.
Regex find:<C# regex pattern> find:(.*\/)+.+\s.+
Find all paths with a space in their name.
Fuzzy find:<search expresion> find:raed
Find all paths that fuzzy matches raed (ex: readme.txt). If the Show all results option is toggled in Quicksearch find performs a fuzzy search.

Dependencies provider

This specialized provider will analyze all the assets in a project and create a dependency index. This index allows more complex queries than what you can do with the Asset Provider. Since the content of the asset files is parsed and analyzed you can even get information on broken references (as opposed to AsssetDatabase.GetDependencies).

Note that this provider is currently a Samples. Go to the QuickSearch section of the Package Manager and install the Samples to benefit from this provider.

Selecting a dependency item in QuickSearch will show in the Details panel all Dependency information for the dependency item:

Information Description
Broken guid of all using assets not part of the project anymore.
Using List of all assets referenced by the dependency item. Similar to AsssetDatabase.GetDependencies. These are all the outgoing references of dependency item.
Used By List of all assets that are referencing the dependency item. These are all the incoming references of dependency item.
Untracked List of all paths that cannot be loaded as an asset that are referenced by the dependency item .

Note that to query this provider you need to explicitly add dep: to the query.

Filter Search
token
Description
Partial asset path dep:<partial path> dep: Materials
Display dependency information relative to all assets with the word materials in their path.
!all dep:!all dep:!all
List all guids and assets indexed by the provider. This can include guids to broken assets.
Guid dep:<guid> dep:595da1eac225fa84fb9c2d465cc69e8b
Display information relative to the asset having the 595da1eac225fa84fb9c2d465cc69e8b guid. This is equivalent to using the id: filter below.
Id dep: id:<guid> dep: id595da1eac225fa84fb9c2d465cc69e8b
Display dependency information relative to the asset having the 595da1eac225fa84fb9c2d465cc69e8b guid.
Path dep: path:<exact path> dep: path:Assets/Materials/Skybox_Mat.mat
Display dependency information relative to the asset with path path:Assets/Materials/Skybox_Mat.mat.
Type dep: t:<file extension> dep: t:cs
Display dependency information relative to all assets with the .cs extension.
Broken dep: is:broken dep: is:broken
Display dependency information for all assets that are referencing a missing asset.
Missing dep: is:missing dep: is:missing
Display dependency information for all guids that are not in the project anymore.
Count dep: count:<number> dep: count>2
Display dependency information for all assets that are referencing (i.e. using) more than 2 other assets.
In dep: in:<number> dep: in>2
Display dependency information for all assets that are being used by more than 2 other assets.
To dep: to:<guid> dep: to:595da1eac225fa84fb9c2d465cc69e8b
Display dependency information for all assets that are referencing (using) the 595da1eac225fa84fb9c2d465cc69e8b guid. These are the incoming references of the 595da1eac225fa84fb9c2d465cc69e8b guid. This corresponds to the Used By section of the Details Panel for the guid 595da1eac225fa84fb9c2d465cc69e8b.
From dep: from:<guid> dep: from:595da1eac225fa84fb9c2d465cc69e8b
Display dependency information for all assets that are referenced by the 595da1eac225fa84fb9c2d465cc69e8b guid. These are all the outgoing references of the 595da1eac225fa84fb9c2d465cc69e8b guid. This corresponds to the Using section of the Details Panel for the guid 595da1eac225fa84fb9c2d465cc69e8b.

Complex Queries examples

Here are a few examples of more complex queries using various filters:

Query Description
h: t:meshrenderer p(castshadows)!="Off" Searches all static meshes in scene that cast shadow.
h: t:light p(color)=#FFFFFF p(intensity)>7.4 Searches all lights in scene with a specific color, but with brightness higher than 7.4
o: t:healthui ref:healthcanvas Use the Object provider to search all indexed prefabs and scene for GameObjects with a HealthUI component that reference the healthcanvas prefab.
h: path:/Collectables t:collectable Find all objects with a component Collectable located under the object at path /Collectables