<!--
{
  "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/RenderLayerComponent",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation20RenderLayerComponentV"
  },
  "title" : "RenderLayerComponent"
}
-->

# RenderLayerComponent

A component that defines which layers an entity participates in.

```
struct RenderLayerComponent
```

## Overview

Add a [`RenderLayerComponent`](/documentation/RealityKit/RenderLayerComponent) to an entity to control which lights illuminate
it and which lights it casts shadows from. A light affects this entity when
the entity’s [`layers`](/documentation/RealityKit/RenderLayerComponent/layers) intersect with the light’s layers, for example
[`layers`](/documentation/RealityKit/DirectionalLightComponent/layers), [`layers`](/documentation/RealityKit/PointLightComponent/layers), or
[`layers`](/documentation/RealityKit/SpotLightComponent/layers).

Entities without a [`RenderLayerComponent`](/documentation/RealityKit/RenderLayerComponent) are treated as members of
[`defaultLayer`](/documentation/RealityKit/RenderLayer/defaultLayer).

## Topics

### Creating a component

[`init(layer:)`](/documentation/RealityKit/RenderLayerComponent/init(layer:))

Creates a layer component with a single layer.

[`init(layers:)`](/documentation/RealityKit/RenderLayerComponent/init(layers:))

Creates a layer component with the specified layers.

### Accessing render layers

[`layers`](/documentation/RealityKit/RenderLayerComponent/layers)

The layers this entity participates in.

[`defaultLayer`](/documentation/RealityKit/RenderLayerComponent/defaultLayer)

A render layer component that contains only [`defaultLayer`](/documentation/RealityKit/RenderLayer/defaultLayer).



---

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)