Version: 2023.1
Language : English
Generating lighting data
GI cache

Lighting Data Asset

A Lighting Data Asset stores precomputed lighting data for a Scene in the Unity Editor. Lighting Data Assets exist as separate files in your Project for workflow reasons; storing precomputed lighting data in a separate file means that changes to the precomputed lighting data do not result in changes to the Scene file. Lighting Data Assets are not intended for users to edit.

Unity stores precomputed lighting data in a Lighting Data Asset when you manually invoke a lighting precompute, either by using the Generate Lighting button in the Lighting window, or by using the Lightmapping.Bake or Lightmapping.BakeAsync APIs.

The Lighting Data Asset contains global illuminationA group of techniques that model both direct and indirect lighting to provide realistic lighting results.
See in Glossary
data and all the supporting files needed to recreate the lighting for a sceneA Scene contains the environments and menus of your game. Think of each unique Scene file as a unique level. In each Scene, you place your environments, obstacles, and decorations, essentially designing and building your game in pieces. More info
See in Glossary
. This asset references the renderers, the real-time lightmapsA pre-rendered texture that contains the effects of light sources on static objects in the scene. Lightmaps are overlaid on top of scene geometry to create the effect of lighting. More info
See in Glossary
, the baked lightmaps, light probesLight probes store information about how light passes through space in your scene. A collection of light probes arranged within a given space can improve lighting on moving objects and static LOD scenery within that space. More info
See in Glossary
, reflection probesA rendering component that captures a spherical view of its surroundings in all directions, rather like a camera. The captured image is then stored as a Cubemap that can be used by objects with reflective materials. More info
See in Glossary
and a data structure which stores the relationships between these elements. It also includes all the precomputed EnlightenA lighting system by Geomerics used in Unity for Enlighten Realtime Global Illumination. More info
See in Glossary
Realtime Global Illumination data needed to update how real-time global illumination looks in the Player.

When you change the scene, for instance by breaking a prefabAn asset type that allows you to store a GameObject complete with components and properties. The prefab acts as a template from which you can create new object instances in the scene. More info
See in Glossary
connection on a GameObjectThe fundamental object in Unity scenes, which can represent characters, props, scenery, cameras, waypoints, and more. A GameObject’s functionality is defined by the Components attached to it. More info
See in Glossary
that is marked as Contribute GI, the asset data will get out of date and has to be rebuilt.

The intermediate files that are generated during the lighting build process, but is not needed for generating a Player build is not part of the asset, they are stored in the GI CacheThe cached intermediate files used when Unity precomputes lighting data. Unity keeps this cache to speed up computation. More info
See in Glossary
instead.

The build time for the Lighting Data Asset can vary. If your GI Cache is fully populated i.e. you have done a bake on the machine before (with the scene in its current state) it will be fast. If you are pulling the scene to a machine with a blank cache or the cache data needed has been removed due to the cache size limit, the cache will have to be populated with the intermediate files first which requires the precompute and bake processes to run. These steps can take some time.

Generating lighting data
GI cache