---
title: "init(_:)"
framework: realitykit
role: symbol
role_heading: Initializer
path: "realitykit/renderlayer/init(_:)"
---

# init(_:)

Creates a custom render layer with the specified compile-time constant name.

## Declaration

```swift
init(_ rawValue: StaticString)
```

## Parameters

- `rawValue`: A unique compile-time constant name for this layer.

## Discussion

Discussion This initializer accepts only compile-time string constants. A precondition checks the validity of the layer name. Use this for defining layer constants in extensions of RenderLayer. It is recommended to use descriptive names with namespace prefixes to avoid conflicts, such as "com.myapp.hero-lighting" or "com.myapp.background". This can look like layer constants as extensions: extension RenderLayer {     static let background = RenderLayer("com.myapp.background") } note: The layer name must not be empty.
