Addressables and baked lightmaps

It seems, scenes and prefabs loaded from bundle files (via Addressable System) are not affected by baked lightmaps. Like occlusion culling and other scene dependency things, lightmaps only work with scenes loaded in standard way (from SceneManager.LoadSceneAsync). With Addressables.LoadSceneAsync, even objects marked as “Static” receive this flag set as disabled. OK, lightmaps can be loaded in runtime by LightmapSettings class, but when I use Renderer.lightmapScaleOffset, to set proper lightmap scale and offset for selected meshes, there is no effect, and I see a lot of warnings like “The renderer Monitor2_LOD0 is a part of a static batch. Setting the lightmap scale and offset will not affect the rendering. The scale and offset is already burnt into the lightmapping UVs in the static batch.”…

So, my question, does someone may share own tips and tricks, how to use Addressables with baked lightmaps. After some tests, I think I need for all scene static objects, write and apply custom Surface Shader with additional texture slot, and in shader code, sample lightmap texture (Lightmap-0_comp_light.exr) with UV2 channel coordinates. Then multiply result with Albedo value. But this is not the most elegant solution…

For tests, with Addressable Asset System 1.16.1:

Addressables.LoadSceneAsync("Assets/Scenes/Test.unity", UnityEngine.SceneManagement.LoadSceneMode.Additive);

and both Shader Stripping LightMap Modes = Automatic or Custom,

lightmap is not available in editor playmode:

but in standalone build, it works and is visible:

Standard lightmapping works fine with addressables.

What I have found are issues with some custom shaders, which it sounds like you are using. I am not a shader guru so I dont know why it does it, but I would look that direction.

Try it with the standard shader and see if it works.