Script Execution Order
Time

Tags and Layers

The Tags and Layers settings (main menu: Edit > Project Settings, then select the Tags and Layers category) allows you to set up Tags, Sorting Layers and Layers.

在定义任何自定义标签或图层之前的 Tags and Layers Manager
在定义任何自定义标签或图层之前的 Tags and Layers Manager

Tags

Tags are marker values that that you can use to identify objects in your Project (see documentation on Tags for further details). To add a new Tag, click the plus button (+) at the bottom-right of the list, and name your new Tag.

添加新标签
添加新标签

请注意,一旦命名了标签,就无法重命名。要删除标签,请单击标签,然后单击列表右下角的减号 (-) 按钮。

标签列表显示了四个自定义标签
标签列表显示了四个自定义标签

Sorting Layers

Sorting Layers are used in conjunction with Sprite graphics in the 2D system. Sorting refers to the overlay order of different Sprites.

添加新的排序图层
添加新的排序图层

要添加和删除排序图层 (Sorting Layers),请使用列表右下角的加号和减号 (+/-) 按钮。要更改其顺序,请拖动每个图层项左侧的控制柄。

The Sorting Layers list, showing four custom sorting layers
The Sorting Layers list, showing four custom sorting layers

Layers

Use Layers throughout the Unity Editor as a way to create groups of objects that share particular characteristics (see documentation on Layers for further details). User Layers primarily to restrict operations such as raycasting or rendering, so that they are only applied to the relevant groups of objects. In the Tags and Layers Manager, the first eight Builtin Layers are defaults used by Unity, so you cannot edit them. However, you can customise User Layers from 8 to 31.

添加新图层
添加新图层

要自定义 8 到 31 的__用户图层__,请在要使用的每个图层的文本字段中输入自定义名称。请注意,无法增加图层数量,但与标签不同,可以重命名图层。

Script Execution Order
Time