Tags and Layers
标签和图层
The Tags and Layers Manager allows you to set up Layers, Tags and Sorting Layers. To view the manager, select Edit > Project Settings > Tags and Layers.
标签和图层管理器允许你设置图层,标签和图层排序.选择编辑>项目设置>标签和图层菜单,可查看此管理器.
Details
细节
Tags are marker values that can be used to identify objects in your project (see this page for further details). New tags can be added by typing in the empty element at the bottom of the list of tags or by increasing the Size value. Decreasing the size will remove tags from the end of the list.
标签是一个标记值可用于辨认你项目中的对象.新标签可通过在标签列表底部的空元素内输入文字添加或通过增大”大小”属性的值.降低大小将从尾部移除标签.
Sorting Layers are used in conjunction with sprite graphics in the 2D system. The “sorting” refers to the overlay order of different sprites. You can add and remove sorting layers using the +/- buttons at the bottom-left of the list and change their order by dragging the handle at the left of each layer item.
图层排序在2D系统中与精灵图像结合使用.”排序”指的是不同精灵的覆盖顺序.你可以使用列表右下角的+/-按钮来添加和移除排序图层并通过拖拽每个图层项左边的柄来改变它们的顺序.
Layers are used throughout Unity as a way to create groups of objects that share particular characteristics (see this page for further details). Layers are primarily used to restrict operations such as raycasting or rendering so that they are only applied to the groups of objects that are relevant. In the manager, the first eight layers are defaults used by Unity and are not editable. However, layers from 8 to 31 can be given custom names just by typing in the appropriate text box. Note that unlike tags, the number of layers cannot be increased.
图层作为一种创建共享特有特征的对象组的方式遍及Unity.图层首先用于限制操作诸如光线投射或渲染,因此它们只应用到相关的对象组上.在管理器中,前8个层是默认用于Unity的且不可编辑.然而,图层8到31可提供自定义名称只需属性文本框输入名称.注意不同于标签,图层数量不能增加.