---
title: "init(layers:)"
framework: realitykit
role: symbol
role_heading: Initializer
path: "realitykit/spotlightcomponent/shadow/init(layers:)"
---

# init(layers:)

Creates a spot light shadow with the specified layers.

## Declaration

```swift
init(layers: RenderLayer.Set? = nil)
```

## Parameters

- `layers`: The layers from which this light accepts shadow casters. If nil, uses layers for shadow casting.

## See Also

### Creating a shadow

- [init()](realitykit/spotlightcomponent/shadow/init().md)
- [layers](realitykit/spotlightcomponent/shadow/layers.md)
