One Logo Pool Ball
RealityFoundation · IOS API REFERENCE

VirtualEnvironmentProbeComponent

struct · iOS 18.0+ · SDK 27.1

struct VirtualEnvironmentProbeComponent

A component that provides environment lighting for entities you place within the same virtual world. In a fully virtual environment, you can configure the `VirtualEnvironmentProbeComponent` with an ``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.

Members (6)

init · iOS 27.0+

init

TypeScript
static initSourceInfluence(source?: VirtualEnvironmentProbeComponent_Source, influence?: VirtualEnvironmentProbeComponent_Influence): VirtualEnvironmentProbeComponent
Swift declaration
init(source: VirtualEnvironmentProbeComponent.Source = .none, influence: VirtualEnvironmentProbeComponent.Influence = .global)
init · iOS 18.0+

init

TypeScript
static initSource(source?: VirtualEnvironmentProbeComponent_Source): VirtualEnvironmentProbeComponent
Swift declaration
init(source: VirtualEnvironmentProbeComponent.Source = .none)

Creates a virtual-environment probe component. - Parameter source: An enumeration describing the source of environment lighting.

get · iOS 18.0+

source

TypeScript
get source(): VirtualEnvironmentProbeComponent_Source
Swift declaration
var source: VirtualEnvironmentProbeComponent.Source

The source of diffuse and specular lighting for environment lighting calculations.

set · iOS 18.0+

source

TypeScript
set source(value: VirtualEnvironmentProbeComponent_Source)
Swift declaration
var source: VirtualEnvironmentProbeComponent.Source

The source of diffuse and specular lighting for environment lighting calculations.

get · iOS 27.0+

influence

TypeScript
get influence(): VirtualEnvironmentProbeComponent_Influence
Swift declaration
var influence: VirtualEnvironmentProbeComponent.Influence { get set }
set · iOS 27.0+

influence

TypeScript
set influence(value: VirtualEnvironmentProbeComponent_Influence)
Swift declaration
var influence: VirtualEnvironmentProbeComponent.Influence { get set }

Skipped declarations

No declarations were skipped in this snapshot.

All RealityFoundation types →