One Logo Pool Ball
RealityFoundation · IOS API REFERENCE

EnvironmentLightingConfigurationComponent

struct · iOS 18.0+ · SDK 27.1

struct EnvironmentLightingConfigurationComponent

A component that scales the amount of light that an entity receives from its environment. When rendering a RealityKit scene, you can control how much the environment's lighting affects the virtual objects in your scene, such as the lighting from your real-world surroundings, a virtual environment, or both. Use an `EnvironmentLightingConfigurationComponent` to configure this amount for an entity. For example, create an entity that receives no lighting from its environment by setting the weight to `0.0`. ```swift let spaceship = try await Entity(named: "spaceship") spaceship.components.set(EnvironmentLightingConfigurationComponent( environmentLightingWeight: 0.0)) ``` - Note: The weight value of the component also affects the lighting of the entity's descendants.

Members (3)

init · iOS 18.0+

init

TypeScript
static init(environmentLightingWeight?: number): EnvironmentLightingConfigurationComponent
Swift declaration
init(environmentLightingWeight: Float = 1.0)

Creates an environment-lighting configuration component. - Parameter environmentLightingWeight: A floating-point value in the range `[0.0, 1.0]`, where `0.0` indicates no environment-lighting contribution and `1.0` indicates full environment-lighting contribution.

get · iOS 18.0+

environmentLightingWeight

TypeScript
get environmentLightingWeight(): number
Swift declaration
var environmentLightingWeight: Float

A value that controls the environment-lighting contribution to an entity's lighting. The weight is a floating-point value in the range `[0.0, 1.0]`. * A value of `1.0` indicates the entity receives the full environment-lighting contribution. * A value of `0.0` indicates the entity receives no light from its environment. The entity still receives lighting from other sources, such as directional, point, and spot lights. * The default value is `1.0`.

set · iOS 18.0+

environmentLightingWeight

TypeScript
set environmentLightingWeight(value: number)
Swift declaration
var environmentLightingWeight: Float

A value that controls the environment-lighting contribution to an entity's lighting. The weight is a floating-point value in the range `[0.0, 1.0]`. * A value of `1.0` indicates the entity receives the full environment-lighting contribution. * A value of `0.0` indicates the entity receives no light from its environment. The entity still receives lighting from other sources, such as directional, point, and spot lights. * The default value is `1.0`.

Skipped declarations

No declarations were skipped in this snapshot.

All RealityFoundation types →