Skip to content

Layers

Updated

A layer is a group of entities identified by a number. Every entity is on exactly one layer, set by its Layer component. Layers let an author treat a group of objects as one: lock all the props so they cannot be picked by accident while editing, switch off every decoration at once, or make all the glass in a scene let clicks pass through. This section explains which layers exist, what a layer controls, and how a script moves entities between layers.

  • You know the common components every entity carries, including Layer, Enable and Lock. See Common components.
  • For the raycasting parts, it helps to know what a pointer ray is. See Input and interaction.
Values Use
0 to 20 User layers, for you to use. Every entity starts on layer 0.
21 to 31 Reserved for the runtime. A Layer component rejects them.

Layers 1 to 10 always exist, labelled unnamed, unlocked, enabled and raycastable until you change them. Any other user layer, 0 included, can be defined as well.

Topic Description
Layer settings Label, colour, locked, enabled and raycastable, and how each one applies.
Layers from a script Move entities between layers, read an entity’s layer and report layer changes.