One Logo Pool Ball
RealityFoundation · IOS API REFERENCE

LightmapComponent

struct · iOS 27.0+ · SDK 27.1

struct LightmapComponent

Describes how a lightmap is applied to parts of the scene. ``LightmapComponent`` specifies which children of its owning entity should have a lightmap applied to them, and connects those children to their corresponding data in a ``LightmapResource``. To use ``LightmapComponent``, first create a ``LightmapResource`` using textures produced by an offline baking process. Then, create a new ``LightmapComponent`` backed by the ``LightmapResource``, and use the ``entityIndexInLightmapResource`` property to map each entity that you wish to be lightmapped, to its corresponding slot in the lightmap resource. Finally, add the ``LightmapComponent`` to an entity that sits above all of the lightmapped entities in the hierachy. ## See Also - ``LightmapResource``

Members (7)

get · iOS 27.0+

entityIndexInLightmapResource

TypeScript
get entityIndexInLightmapResource(): NativeMap<Entity, number>
Swift declaration
var entityIndexInLightmapResource: [Entity : LightmapComponent.EntityIndex]

A dictionary mapping the descendants of the LightmapComponent-holding entity to their corresponding slot in the Lightmap resource.

set · iOS 27.0+

entityIndexInLightmapResource

TypeScript
set entityIndexInLightmapResource(value: NativeMap<Entity, number>)
Swift declaration
var entityIndexInLightmapResource: [Entity : LightmapComponent.EntityIndex]

A dictionary mapping the descendants of the LightmapComponent-holding entity to their corresponding slot in the Lightmap resource.

get · iOS 27.0+

indirectIrradianceContributionScale

TypeScript
get indirectIrradianceContributionScale(): number
Swift declaration
var indirectIrradianceContributionScale: Float { get set }

Multiplies the indirect irradiance contribution stored in the lightmap by the given value.

set · iOS 27.0+

indirectIrradianceContributionScale

TypeScript
set indirectIrradianceContributionScale(value: number)
Swift declaration
var indirectIrradianceContributionScale: Float { get set }

Multiplies the indirect irradiance contribution stored in the lightmap by the given value.

get · iOS 27.0+

lightmap

TypeScript
get lightmap(): LightmapResource
Swift declaration
var lightmap: LightmapResource { get set }

The LightmapResource backing this component.

set · iOS 27.0+

lightmap

TypeScript
set lightmap(value: LightmapResource)
Swift declaration
var lightmap: LightmapResource { get set }

The LightmapResource backing this component.

init · iOS 27.0+

init

TypeScript
static init(resource: LightmapResource): LightmapComponent
Swift declaration
init(resource: LightmapResource)

Creates a new LightmapComponent backed by the given LightmapResource.

Skipped declarations

No declarations were skipped in this snapshot.

All RealityFoundation types →