Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

BakeMultipleScenes Asynchronously

Discussion in '5.5 Beta' started by Selzier, Oct 17, 2016.

  1. Selzier

    Selzier

    Joined:
    Sep 23, 2014
    Posts:
    652
    I've created a feature request to bake multiple scenes asynchronously.
    https://feedback.unity3d.com/sugges...ronously-bakemultiplescenesasync-string-paths

    Lightmapping.BakeMultipleScenes does not allow for asynchronous baking. When using BakeMultipleScenes, the editor is locked until the operations completes.

    Lightmapping.BakeSelectedAsync would seem to have the capability to do the job, if you set Selection.objects[] to the multiple scenes that you want to bake, but this does not work. Or, there is no control of what scene's Lighting settings get used.

    With, Lightmapping.BakeMultipleScenes Lighting settings are used from scenes index 0 in the array. However, with Lightmapping.BakeSelectedAsync, I cannot control what scene's Lighting settings are used, even if I name my desired scene prefixed with an underscore, or 'a' like this:
    _MySceneWithLightSettings
    aMySceneWithLightSettngs


    Naming in this way puts the scene at index 0 of Selection.Objects but the Lighting settings are still not used correctly, as when I call Lightmapping.BakeMultipleScenes with _MySceneWithLightSettings at index 0.

    https://docs.unity3d.com/550/Documentation/ScriptReference/Lightmapping.html