Skip to content

Workaround for Build and Store #13

@markvitapoly

Description

@markvitapoly

Hi, I am using Unity 2017.2.0f3 and the lightmaps are messed up after baking. I see this comment:

The "Build" and the "Store" steps have not been merged because in some builds ( seen in 5.5.0f1 ) the lightmaps don't load correctly after baking

I have a few lightmaps set up for a particular scene so I modified the script to build and store them all overnight. Is there a workaround to this existing issue? I've tired something like this:

    Debug.Log("Building Lights: " + ScenarioName);
    yield return BuildLightingAsync(ScenarioName);

    EditorSceneManager.CloseScene(EditorSceneManager.GetSceneByPath(BaseScenePath + "/" + ScenarioName + ".unity"), true);

    Debug.Log("Enter Play Mode");
    EditorApplication.ExecuteMenuItem("Edit/Play");

    ///////// The below code doesn't get executed anymore once Play mode starts. Workarounds?
    Debug.Log("Waiting 30 seconds");
    yield return new WaitForSeconds(30);              

    Debug.Log("Exit Play Mode");
    EditorApplication.ExecuteMenuItem("Edit/Play");

    Debug.Log("Storing Light");
    StoreLightmapInfos(storeIndex);

Thanks!

Metadata

Metadata

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions