Search Issue Tracker
By Design
Votes
0
Found in
2019.3.15f1
2019.4
2020.1
2020.2
Issue ID
1262675
Regression
No
Lightmap is incorrect in Standalone with all LodGroups except Lod0
How to reproduce:
1. Open attached project "LightmapST.zip" and scene "SampleScene"
2. Enter Play mode
3. Observe the Game view
4. Build and Run
5. Observe the Standalone
Expected result: Game view and Standalone lightmap results are the same
Actual result: Standalone lightmap have artifacts
Reproducible with: 2019.4.4f1, 2020.1.0b16, 2020.2.0a18
Could not test with: 2018.4 (lightmapper error of a feature which is not present in the version)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Articulation Body with 'Revolute' Joint Type has erratic behavior when Upper Limit is set to above 360
- WebGL Player fails to render Scene when Terrain with Detail Mesh is added and WebGPU Graphics API is used
- Inconsistent errors are logged when different types are passed into the Query "Q<>" method in UIToolkit and the ancestor VisualElement is null
- Crash on GetMaterialPropertyByIndex when opening a specific Scene
- Discrepancies in the styling are present when using a TSS file instead of a USS file in custom EditorWindow
Resolution Note:
The issue happens due to the lightmap scale/translate values not being correctly baked in to the mesh UV2 channel for the standalone player.
This happens because code which runs in the Editor is not being run at build time in order to sync those values. The Editor code relies on a function being called at domain reload, however this doesn't happen in the build.
Rebaking lighting via the light baking window appears to fix the issue because what is happening behind the scenes is a new callback for OnSceneOpened is being registered, which does get called during the build process, and that calls the code which fixes up the scale/offset values for the renderer.