Unity3D说明文档翻译-Searching

本文介绍了如何在Unity中使用搜索功能高效地查找场景中的对象。包括通过名称、组件类型及资源标签进行搜索的方法,以及场景视图和层级视图中的搜索过滤应用。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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 (see below). You can specify the search mode by choosing from the Search drop-down menu.

当在大型而复杂的场景工作时,搜索特定对象非常有用.使用Unity搜索特性,你可以过滤对象或对象组为你想看到的.你可以通过名称,组件类型和在某些情况下通过资源标签来搜索资源.你可以通过搜索下拉菜单指定搜索模式.

Scene Search

场景搜索

Both the Scene and Hierarchy views have a search box that allows you to filter objects by their names. Since the two views are basically just different representations of the same set of objects, any search query you type will be duplicated in both search boxes and applied to both views at the same time. Note that both views change slightly when a search is active: the Scene View will show filtered-out objects in grey and the Hierarchy view will lose the hierarchic information and simply show objects listed by name:

场景和层级视图都有搜索框,允许你通过名称过滤对象.因为这两种视图本质上只是相同对象的不同表示形式而已,你输入的任何搜索查询都将复制到两个搜索框内并同时应用到两个视图.注意,当一个搜索激活时,两个视图稍有不同:场景视图将过滤掉的对象显示为灰色而层级视图将丢弃分层信息并简单的将对象按名称列出.

Scene and Hierarchy views with search filtering applied.

提交搜索过滤后的场景和层级视图

 

The small cross button at the right of the search box removes the search query and restores the view to normal. The menu at the left hand side of the box lets you choose whether to filter objects by name, by type or both at once.

在搜索框右边的小交叉按钮用于删除搜索查询并恢复视图到正常.搜索框右手边的菜单让你可以选择过滤是按名称,类型还是两者一起.

Project Search and Labels

项目搜索和标签

There is also a search box in the Project view. The search applies to assets rather than their instances in the scene.

项目视图也有一个搜索框.搜索请求的是资源而不是它们在场景中的实例.

One additional option available for assets is to search by Labels as well as by name and type. A label is simply a short piece of text that you can use to group particular assets. If you click on the label button second from the left of the Project window you will see a menu of existing labels with a text box at the top. You can then request assets assigned specific label. Also you can create new labels. For example you could add a “Vehicles” label to make all vehicle assets easy to locate. You can add a label to an asset from the Asset Labels box at the bottom of its inspector.

有一个额外选项在资源上可用,就是通过标签搜索,和通过名称和类型是一样的.一个标签就一小块简单的文本,你可以用来分组特定资源.如果你点击项目窗口右边的标签按钮,你会看到一个现有标签的菜单,它的顶部有一个文本框.接着你可以请求给资源指定特定标签.你也可以创建一个新的标签.例如你可以添加一个交通工具标签使所有交通工具资源容易被定位.你可以同资源在检视面板底部的资源标签选项框给它们添加标签.

Adding a “Prop” label

添加一个”Prop”标签.

 

The text box lets you filter the existing labels or enter the text of a new label; you can press the spacebar or enter key while typing to add the new label text to the asset. Labels currently applied to an asset are shown with a check mark to their left in the menu. You can simply “select” an applied label from the menu to remove it. Note that any asset can have as many labels as desired and thereby belong to several different label groups at once.

文本框使你可以过滤现有标签或输入文本作为一个新标签.当你要添加一个新标签到资源上时,你可以按空格或Enter键.标签当前请求的资源在它的菜单左边显示一个复选标记.你可以简单的在此菜单上选定一个请求标签来删除它.注意,如需要任何资源都可以有多个标签,从而同时属于几个不同的标签组.

See Inspector manual page for more informatation.

查看检视面板手册页面获取更多信息.

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值