<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/SpotLightComponent/layers",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation18SpotLightComponentV6layersAA11RenderLayerV3SetVvp"
  },
  "title" : "layers"
}
-->

# layers

The layers this light illuminates.

```
var layers: RenderLayer.Set { get set }
```

## Discussion

A spotlight illuminates an entity when the layers of the entity’s
[`RenderLayerComponent`](/documentation/RealityKit/RenderLayerComponent) intersect with this set. Entities without a
[`RenderLayerComponent`](/documentation/RealityKit/RenderLayerComponent) belong to [`defaultLayer`](/documentation/RealityKit/RenderLayer/defaultLayer), which is
the only member of `layers` by default.

For an example of layer-based light linking, see
[`layers`](/documentation/RealityKit/DirectionalLightComponent/layers).

Lights can be restricted by layer on devices with Apple6 GPU family feature support.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)