Search Unity

  1. Calling all beginners! Join the FPS Beginners Mods Challenge until December 13.
    Dismiss Notice
  2. It's Cyber Week at the Asset Store!
    Dismiss Notice

Baked lighting disappears with addressables 1.1.5

Discussion in 'Addressables' started by RobbyZ, Jul 25, 2019.

  1. RobbyZ

    RobbyZ

    Joined:
    Apr 17, 2015
    Posts:
    18
    When I attempt to load a scene in a standalone build or in Packed mode in editor, the baked lightmap vanishes:

    upload_2019-7-24_21-34-48.png

    Loading in virtual mode seems to work fine:

    upload_2019-7-24_21-34-59.png

    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...?

    upload_2019-7-24_21-35-41.png

    upload_2019-7-24_21-35-30.png

    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.

    upload_2019-7-24_21-44-51.png

    My loader code looks like as follows:

    Code (CSharp):
    1. AssetReference levelToLoadReference = GetAddressableSceneReference(levelName);
    2.         if (levelToLoadReference != null)
    3.         {
    4.             AsyncOperationHandle loadScene = Addressables.LoadSceneAsync(levelToLoadReference, LoadSceneMode.Additive);
    5.  
    6.             yield return new WaitUntil(() => loadScene.IsDone);
    7.         }
    8. SceneManager.SetActiveScene(SceneManager.GetSceneByName(levelName));
    9.  
     
  2. RobbyZ

    RobbyZ

    Joined:
    Apr 17, 2015
    Posts:
    18
    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).
     
  3. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    468
    You can submit the bug from Unity Editor. I think Addressables should work by default without a lot of tedious settings and hacks.