大多数搜索提供程序使用 QueryEngine(场景、资源、对象和资源提供程序)来解析和处理其查询。它们支持一组基本的查询运算符,允许使用布尔运算符和括号分组进行更复杂的查询。此页面上的表列出了支持的查询运算符。
大小写敏感性:大多数搜索查询忽略大小写。例如,Stone、stone 或 sToNe 的结果相同。
| 筛选 | 搜索令牌 | 描述 | ||
|---|---|---|---|---|
| Basic search | <any partial name> |
main搜索单词 Main 的匹配 |
||
| 以及 | and |
Main and t:camera搜索名称包含 Main 且类型名称包含 camera 的位置t:texture and jpg搜索文件名中包含 jpg 的所有类型 texture。注意:由于 and ** 是 QueryEngine 的默认运算符,因此最后一个查询等同于:t:texture jpg |
| 或者** |
or |
Player or Monster包含单词 Player 或 Monster 的搜索。 |
| 组 | (<group content>) |
t:Character and (status=Poison or status=Stunned)搜索 status 属性值为 Poison 或 Stunned 的 Character 组件。 |
||
| Exclusion | -<Expression to exclude> |
p: dep:door -t:Scene搜索依赖于包含单词 door 且非 Scene 类型的资源的所有资源。p: dep:door -stone搜索依赖于包含单词 door 且不包含单词 stone 的资源的所有资源。 |
||
| Exact Operator | !<something> |
Search 中的大多数字符串匹配都会返回部分匹配结果。使用 ! 运算符返回完全匹配结果。p: stone搜索包含单词 stone( stone_hammer.png、stone_door.prefab)的所有资源。p: !stone搜索名称正好为 stone 的所有资源(例如:stone.png) |
||
| Partial Value match (:) | property:<partial value> |
ref:aster因为使用了 :,所以会搜索具有包含单词 aster(例如:asteroid2、asteroids)的资源作为依赖项的所有资源。 |
||
| Exact Value (=) | property=exactValue |
ref=asteroid因为使用了 =,所以会搜索具有名称完全为 asteroid 的资源作为依赖项的资源。 |
||
| > | property>number |
t:texture size>256搜索大小大于 256 字节的所有纹理。 |
||
| < | property<number |
t:texture size<256搜索大小小于 256 字节的所有纹理。 |
||
| != | property!=number |
t:texture size!=256搜索大小不等于 256 字节的所有纹理。 |
||
| >= | property>=number |
t:texture size>=256搜索大小大于或等于 256 字节的所有纹理。 |
||
| <= | property>number |
t:texture size<=256搜索大小小于或等于 256 字节的所有纹理。 |