Search Unity

Lighting Assets files on multiple computers

Discussion in 'Global Illumination' started by dgoyette, Sep 2, 2019.

  1. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,195
    I asked this over on the Editor forum, but I should have asked here.

    Basically, I'm having an issue with baking lightmaps on multiple computers, and I don't know how to address the problem efficiently.

    I use .gitignore to keep lighting asset files from being included in source control, because the files are massive. Even git LFS isn't viable, as the files as just too large.

    The problem with this approach is that each Unity scene file keeps a reference to the lighting data asset. For example:

    Code (CSharp):
    1. m_LightingDataAsset: {fileID: 112000000, guid: d4de5afd6d7c2478b9aa84dad1cf3ccc,
    What this means is that if someone else bakes lighting for a scene, and commits their scene changes, Unity will no longer use my lighting asset file, because the scene is looking for a lighting asset file that doesn't exist on my machine.

    Does anyone have a reasonable way to address this issue? I'm fine with each computer baking its own lighting, but right now it means having to rebake all lighting for scenes any time anyone commits a change to a scene. Hopefully there's some approach I can take to avoid this kind of conflict?