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

# VirtualEnvironmentProbeComponent

A component that provides environment lighting for entities you place within the same virtual world.

```
struct VirtualEnvironmentProbeComponent
```

## Overview

In a fully virtual environment, you can configure the `VirtualEnvironmentProbeComponent` with an
[`EnvironmentResource`](/documentation/RealityKit/EnvironmentResource) to provide precalculated indirect lighting from the environment. RealityKit
combines this lighting with other lights in the scene to calculate the final lighting of an entity.
The example below shows how you can set up a `VirtualEnvironmentProbeComponent` from
a single probe:

```swift
let environment = try await Entity(named: "environment")
let resource = try await EnvironmentResource(named: "MyEnvironment", in: bundle)
let probe = VirtualEnvironmentProbeComponent.Probe(environment: resource)
let probeComponent = VirtualEnvironmentProbeComponent(source: .single(probe))
environment.components.set(probeComponent)
```

> Note: In visionOS, ARKit automatically provides the environment lighting for the shared space.

## Topics

### Creating a probe component

[`init(source:influence:)`](/documentation/RealityKit/VirtualEnvironmentProbeComponent/init(source:influence:))

### Configuring probe influence

[`influence`](/documentation/RealityKit/VirtualEnvironmentProbeComponent/influence-swift.property)

[`VirtualEnvironmentProbeComponent.Influence`](/documentation/RealityKit/VirtualEnvironmentProbeComponent/Influence-swift.struct)

Defines the spatial influence of an environment probe.



---

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)