Documentation

Unity Engine

Unity Engine

AllLayers

Layer mask constant to select all layers.
Read time 1 minuteLast updated 2 months ago

Definition

  • Type: Field
  • Namespace: UnityEngine
  • Assembly: UnityEngine.PhysicsModule
public const int AllLayers = -1

Remarks

This can be used in the layermask field of Physics.Raycast and other methods to select all layers.