Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

AssetBundles and LightMaps

Discussion in 'Editor & General Support' started by Piflik, Sep 3, 2015.

  1. Piflik

    Piflik

    Joined:
    Sep 11, 2011
    Posts:
    290
    As a followup to my last question: Is there an established workflow for including LightMaps in an AssetBundle?

    If I try to put them in one Bundle together with the scene(s), I get a message that I cannot combine Assets and Scenes in a single Bundle, but if I try to load a lightmapped scene from a Bundle (in the assumption that the LightMaps might have been included autmatically, like the meshes and prefabs used in the scene), I also get an error: "Failed reading from: 'd8/d858b9ec64c52b36f62218c8d121d791.ecm'."

    Edit: I noticed that Loading the Scene additively prevents the error. The meshes still aren't properly lightmapped, although I can see a faint shadow from the lightmap. Some part of it seems to be imported properly. But the meshes are too bright (Images attached). Also I noticed the static flag was absent from all imported objects, which probably also messes with lightmapping, but setting the flag manually in the running scene, doesn't make a difference. Also the lightsource (also part of the imported scene) doesn't influence the imported models. Changing the Baking Type from Mixed to Realtime or Baked doesn't change that behaviour.
     

    Attached Files:

    Last edited: Sep 3, 2015
  2. Piflik

    Piflik

    Joined:
    Sep 11, 2011
    Posts:
    290
    This issue seems to be resolved with Unity 5.2. Further testing required, but currently it looks like it works correctly.