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.