Baked lighting disappears with addressables 1.1.5

When I attempt to load a scene in a standalone build or in Packed mode in editor, the baked lightmap vanishes:

Loading in virtual mode seems to work fine:

Unlike prior reported issues, all the maps in the baked list appear to be loaded okay according to the preview images. They just don’t show up in-game.

Two things that do change are Enlighten/Progressive setting and LightingDataAsset setting – however, I don’t think these would be needed during runtime…?

Each spot light is set to the same settings, using mixed mode in Enlighten with Baked GI in shadowmask lighting mode. Realtime GI is not enabled for this scene. Unity version is 2018.4.2f1 LTS with Addressables 1.1.5. Both the scene and its lightmaps have been enabled for the addressables system, with bundles packed separately per asset. I have tried with LightingData.asset both included and not included in addressables with no change.

My loader code looks like as follows:

AssetReference levelToLoadReference = GetAddressableSceneReference(levelName);
        if (levelToLoadReference != null)
        {
            AsyncOperationHandle loadScene = Addressables.LoadSceneAsync(levelToLoadReference, LoadSceneMode.Additive);

            yield return new WaitUntil(() => loadScene.IsDone);
        } 
SceneManager.SetActiveScene(SceneManager.GetSceneByName(levelName));

So I think I managed to resolve this by switching to manual shader stripping for the lightmap under project settings > graphics > custom lightmap mode (copying from one of my game scenes).

2 Likes

You can submit the bug from Unity Editor. I think Addressables should work by default without a lot of tedious settings and hacks.

Your comment saved me from a few extra hours of pain! I had a strange issue where I loaded a scene in additive mode and then switched to it using SetActiveScene. The target scene had specific lighting settings that should be applied when I set it as active. But after I’ve moved this specific scene from “In Build” to addressable bundle - these lighting settings stopped working. I was pulling my hair out until I’ve switched shader stripping options to Custom and checked only the things that my scenes used manually.

Real shame that Addressables package doesn’t solve this issue automatically. I can see a large portion of users stumbling upon this at least once.

1 Like