Tags and Layers 设置(主菜单:__Edit__ > Project Settings__,然后选择 Tags and Layers__ 类别)可用于设置标签 (Tags)、排序图层 (Sorting Layers) 和图层 (Layers)。
标签 (Tags) 是标记值,可用于标识项目中的对象(有关更多详细信息,请参阅标签文档)。要添加新标签,请单击列表右下角的加号按钮 (+),然后命名新标签。
请注意,一旦命名了标签,就无法重命名。要删除标签,请单击标签,然后单击列表右下角的减号 (-) 按钮。
排序图层与 2D 系统中的精灵图形结合使用。排序 (Sorting) 是指不同精灵的覆盖顺序。
要添加和删除排序图层 (Sorting Layers),请使用列表右下角的加号和减号 (+/-) 按钮。要更改其顺序,请拖动每个图层项左侧的控制柄。
在 Unity 编辑器中使用图层可以创建具有共同特定特征的对象组(有关更多详细信息,请参阅图层文档)。用户图层主要用于限制射线投射或渲染等操作,以便它们仅应用于相关的对象组。标记为 Builtin Layer 的图层是 Unity 使用的默认图层,您无法对其进行编辑。您可以自定义标记为 User Layer 的图层。
要自定义 __User Layers__,请在要使用的每个图层的文本字段中输入自定义名称。请注意,无法增加图层数量,但与标签不同,可以重命名图层。
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.