Uninomicon

Documenting the dark corners of the Unity Engine.

User Tools

Site Tools


lightingdataasset

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
lightingdataasset [2021/02/11 21:36]
73.95.178.156
lightingdataasset [2021/05/01 16:06]
73.95.178.156
Line 2: Line 2:
 //aka ''Lightmapping.lightingDataAsset''// //aka ''Lightmapping.lightingDataAsset''//
  
-This asset stores a bunch of data related to a lightmapping bake. This includes: +This asset stores data related to a lightmapping bake. This includes: 
  
- * The [[lightmapsettings.lightprobes|Light Probes]] for all scenes +  * The [[lightmapsettings.lightprobes|Light Probes]] for all scenes 
- * Lightmap Scale and Trasnform for MeshRenderers+  * Lightmap Scale and Transform 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. 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.
Line 11: Line 11:
 This data is also read while computing [[static batching]]. It bakes the scales and transforms of MeshRenderers set in this file into the ''CombinedMesh'' of the static batch.((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!)) This data is also read while computing [[static batching]]. It bakes the scales and transforms of MeshRenderers set in this file into the ''CombinedMesh'' of the static batch.((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!))
  
 +===== Format =====
  
 +This asset is a standard Unity object. The format and data layout can be found via reflection of serialized properties.
  
 +The community [[https://github.com/NewBloodInteractive/com.newblood.lightdata/blob/master/Editor/LightingData.cs|com.newblood.lightdata]] package can be used to edit these assets, and contains the most up-to-date data format.
  
lightingdataasset.txt · Last modified: 2021/05/01 16:06 by 73.95.178.156