Uninomicon

Documenting the dark corners of the Unity Engine.

User Tools

Site Tools


lightingdataasset

This is an old revision of the document!


Lighting Data Asset

aka Lightmapping.lightingDataAsset

This asset stores a bunch of data related to a lightmapping bake. This includes: * Light Probes for all scenes * Lightmap Scale and Trasnform for MeshRenderers

Just after a scene loads, Unity will read this data asset and apply the settings from it to restore the lightmapping. This happens in the player and at runtime.

This data is also read while computing Renderer Batching. It bakes the scales and transforms of MeshRenderers set in this file into the CombinedMesh of the static batch.1)

1)
This means that if you don't have a lightingData asset set in a scene, the lightmap UV coordinates of static batching is calculated incorrectly!
lightingdataasset.1613079373.txt.gz · Last modified: 2021/02/11 21:36 by 73.95.178.156