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

# SpotLight

An entity that illuminates virtual content in a cone-shaped volume.

```
@MainActor @preconcurrency class SpotLight
```

## Overview

During an AR session, RealityKit automatically lights your virtual objects
to match real-world lighting.
You can also explicitly add virtual lights that act upon your virtual content.
This is typically most useful outside of an AR session on iOS or macOS,
where your [`RealityViewCameraContent`](/documentation/RealityKit/RealityViewCameraContent) [`camera`](/documentation/RealityKit/RealityViewCameraContent/camera)
property is set to [`virtual`](/documentation/RealityKit/RealityViewCamera/virtual).

A RealityKit scene can contain up to eight dynamic lights, which are
entities that contain a
[`SpotLightComponent`](/documentation/RealityKit/SpotLightComponent), [`PointLightComponent`](/documentation/RealityKit/PointLightComponent), or a [`DirectionalLightComponent`](/documentation/RealityKit/DirectionalLightComponent).
This limit doesn’t include light from image-based lighting.

Devices that support `MTLGPUFamily.apple6` or later lift this limit, so a scene can
contain many more dynamic lights.

## Topics

### Creating a spotlight

[`init()`](/documentation/RealityKit/SpotLight/init())

Creates a new entity.



---

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)