Search Unity

Lightmap index data is constantly lost

Discussion in 'Editor & General Support' started by Zenix, Jan 12, 2017.

  1. Zenix

    Zenix

    Joined:
    Nov 9, 2009
    Posts:
    213
    We constantly have an issue where lightmaps don't appear in the editor or the game.

    Whenever this happens I can see in the editor that the lightmaps are still being loaded, but the 'lightmapIndex' value is set to -1 for all renderers, so the scene appears unlit.

    I believe we're properly adding all relevant files to source control. We source control the scene file, the LightingData.asset file, all files in ProjectSettings, and all the .meta files for each asset. Is there something I'm missing?

    Right now we're forced to work without lightmaps most of the time, and we rebake them before doing a release. Hardly an ideal scenario.
     
  2. Zenix

    Zenix

    Joined:
    Nov 9, 2009
    Posts:
    213
    Still looking for an answer to this one...
     
  3. nawash

    nawash

    Joined:
    Jan 29, 2010
    Posts:
    166
    same thing here...
     
  4. nawash

    nawash

    Joined:
    Jan 29, 2010
    Posts:
    166
    Got it.
    Uncheck auto generate on machine A. This will generate a LightingData.asset file in the scene subfolder when you press Generate lighting
    Commit.
    Pull on machine B.
    In the Lighting > Global maps window , set the LightingData.asset that was generated on machine A
    Save
    Close scence
    Reopen scene
     
    OWL7seven likes this.