Searching 搜索
When working with large complex scenes it can be useful to search for specific objects. By using the Search feature in Unity, you can filter out only the object or group of objects that you want to see. You can search assets by their name, by Component type, and in some cases by asset Labels. You can specify the search mode by choosing from the Search drop-down menu.
当使用大型的复杂场景时,(利用查询功能)搜索特定的对象是很有用的。通过使用Unity的搜索功能,你可以筛选出你想看到的对象或对象组。你可以按它们的名称或者组件类型搜索资源,有时候也可以按资源的标签来搜索。你可以通过搜索下拉菜单来选择搜索模式。
Scene Search 场景搜索
When a scene is loaded in the Editor, you can see the objects in both the Scene View and the Hierarchy. The specific assets are shared in both places, so if you type in a search term (e.g. "bridge"), you'll see the the filter applied both visually in the Scene View and a more typical manner in the Hierarchy. There is also no difference between typing the search term into the search field in the Scene View or the Hierachy -- the filter takes effect in both views in either case.
当编辑器加载了一个场景,你可以在场景和层次这两个视图中看到对象。具体的资源在这两个地方是共用的,所以如果你输入一个搜索项(如"桥"),你会看到筛选结果都会出现在场景视图和层次视图中(原话不止这个意思),在场景视图和层次视图分别输入搜索字段不会影响结果——两种方式下过滤器都将在两个视图中起作用。
Scene View and Hierarchy with no search applied. 没使用搜索的场景视图和层次视图
Scene View and Hierarchy with active filtering of search term. 索项过滤器激活后的场景和层次视图
When a search term filter is active, the Hierarchy doesn't show hierarchical relationships between GameObjects, but you can select any GameObject, and it's hierarchical path in the scene will be shown at the bottom of the Hierarchy.
当搜索项过滤器是激活的,层次视图不会显示游戏对象之间的层次关系,但你可以选择任何游戏对象,它在场景中的分级路径将在层次视图的底部所示。
Click on a GameObject in the filtered list to see its hierarchical path.
在筛选列表中点击一个游戏对象可以看到它的分级路径
When you want to clear the search filter, just click the small cross in the search field.
当你想清除搜索过滤器时,只需点击搜索字段中的小十字。
In the Scene search you can search either by Name or by Type. Click on the small magnifying glass in the search field to open the search drop-down menu and choose the search mode.
在场景搜索中,你可以按名称或类型进行搜索。点击搜索字段中的小放大镜,将打开搜索下拉菜单,选择搜索模式。
Search by Name, Type, or All. 按名字,类型,或全部搜索
Project Search 项目搜索
The same fundamentals apply to searching of assets in the Project View -- just type in your search term and you'll see all the relevant assets appear in the filter.
在项目视图中搜索资源使用同样的方式——只要输入你的搜索项,你会看到所有的相关资源出现在过滤器中。
In the Project search you can search by Name or by Type as in the Scene search, and additionally you can search by Label. Click on the small magnifying glass in the search field to open the search drop-down menu and choose the search mode.
在项目搜索中,你可以象在场景搜索中一样按名称或类型进行搜索,另外你还可以按标签搜索。点击搜索字段中的小放大镜打开搜索下拉菜单,选择搜索模式。
Search by Name, Type, Label, or All. 按名称、类型、标签或全部进行搜索
Object Picker Seach 对象选择器搜索
When assigning an object via the Object Picker, you can also type in any search term search to filter down to only the objects you want to see.
当通过对象选择器选取一个对象时,你也可以输入任何搜索项来筛选出你想看到的对象。