Skip to content

Layer

The Layer property of the Node is an unsigned 32-bit integer, supporting up to 32 different types of Layer, which can be set in Project -> Project Settings -> Layers in the menu bar above the editor. The developer can customize the Layer 0 ~ 19, and the remaining 12 Layers are the engine's built-in ones.

The Visibility property of the Camera and the Layer property of the Node are both used to control the visibility of nodes. However, a node can only be seen by the camera if the Layer property set in the node is included in the Visibility of the camera. The Visibility property of the camera uses bitwise operators (such as | and &) to determine whether a node's Layer should be visible, and supports selecting multiple Layers at the same time. See the Camera — Set the Visibility property documentation for details.

The engine's built-in Layers

layer gizmo

PropertyDescriptionProperty Value
NONESet all invisible0
IGNORE_RAYCASTSetting to ignore ray detection1 << 20
GIZMOSSet gizmo information visible1 << 21
EDITORSet editor visible1 << 22
UI_3DSet the 3D UI node to be visible1 << 23
SCENE_GIZMOSet scene gizmo visible1 << 24
UI_2DSet 2D UI nodes visible1 << 25
PROFILERSet the profiler node to be visible1 << 28
DEFAULTSet the default node to be visible1 << 30
ALLSet all nodes to be visible0xffffffff

User-defined Layers

layer gizmo