Symptoms
- My build, when using Unity Build Automation, is much darker than a local build.
- 3D assets are dark when using Unity Build Automation to build the game.
Cause
Unity Build Automation does not currently support building light maps, and attempting to do so may result in the above-mentioned issue and poor build performance. There are a couple of possible causes which might explain what is going wrong:
- You are using Precomputed Realtime GI for your scene and the Auto Build for lightmaps is enabled.
- Your build results are not checked into your repository.
Resolution
Make sure that you have turned off Auto-Generate Lighting in your scenes (it is a per-scene setting), and manually build (and commit) your light maps. Depending on what your scene includes and your lighting settings, you will need to commit the following files:
- LightingData.asset
- LightmapSnapshot.asset
- Lightmap-xxx.exr
- Lightprobe-xxx.exr
The files are stored in a subfolder named after the scene in the same folder as your scene. For more information about lightmaps please read here.
More Information
For more information about lighting please read here.