<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/HasDirectionalLight",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation19HasDirectionalLightP"
  },
  "title" : "HasDirectionalLight"
}
-->

# HasDirectionalLight

An interface that defines a directional light source component.

```
@MainActor @preconcurrency protocol HasDirectionalLight : HasTransform
```

## Topics

### Getting the directional light

[`var light: DirectionalLightComponent`](/documentation/RealityKit/HasDirectionalLight/light)

A directional light component for the entity.

### Specifying the shadow

[`var shadow: DirectionalLightComponent.Shadow?`](/documentation/RealityKit/HasDirectionalLight/shadow)

The shadow settings for a directional light.

## Relationships

### Conforming Types

[`DirectionalLight`](/documentation/RealityKit/DirectionalLight)

### Inherits From

[`HasTransform`](/documentation/RealityKit/HasTransform)

---

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)