init
TypeScriptstatic init(): Promise<SpotLight>Swift declaration@MainActor @preconcurrency required init()Creates a new entity.
class · iOS 13.0+ · SDK 27.1
@MainActor @preconcurrency class SpotLightAn entity that illuminates virtual content in a cone-shaped volume. 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`` ``RealityViewCameraContent/camera`` property is set to ``RealityViewCamera/virtual``. A RealityKit scene can contain up to eight dynamic lights, which are entities that contain a ``SpotLightComponent``, ``PointLightComponent``, or a ``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.
static init(): Promise<SpotLight>Swift declaration@MainActor @preconcurrency required init()Creates a new entity.
No declarations were skipped in this snapshot.