I’m running into an issue where I am trying out baked lighting on an existing project and I have a scene setup with baked lighting and it looks great in the editor. However, if I do a standalone build, the baked lighting just doesn’t show up at all, only realtime lights seem to work in a build.
I’ve tried searching around for options and I have tried resetting graphics/quality settings, messing around with post-processing/shader stripping and all the lighting settings I can think of but nothing seems to have made any difference. For what it’s worth I am using URP and Unity 2022 LTS. Anyone have any suggestions or run into anything like this?
Graphics and quality settings are indeed good places to look for a culpirit. You can also try a few things to get an insight as to what goes wrong:
try creating another basic scene with baked lighting and check if things work as expected in the built player
try to check with the Frame Profiler if there are suspicious differences when running in Editor and in the Player. (like lightmaps not being binded anymore in the opaque pass rendering your objects that are supposed to use baked lighting)
I think I eventually resolved this issue, the root of the issue for me seemed to be due to my project using addressables. I was testing a stripped-down build where I included the scene as the base startup scene instead of using the addressable system which I normally would do.
But when I switched to loading the screen through the addressables system it seemed to all load properly including lightmaps.
I will keep an eye on it but that seemed to be the issue for me at least.