<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 18.0.0 -",
    "macOS: 15.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/DynamicLightShadowComponent/init(castsShadow:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation27DynamicLightShadowComponentV05castsE0ACSb_tcfc"
  },
  "title" : "init(castsShadow:)"
}
-->

# init(castsShadow:)

Creates a dynamic light shadow component.

```
init(castsShadow: Bool)
```

## Parameters

`castsShadow`

A Boolean value that indicates whether an entity
with the component casts a shadow.

## Discussion

By default, the component makes an entity to stop casting shadows
from dynamic lights.

---

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)