Search Unity

Lightning Unity 5.2.1 Android

Discussion in 'Editor & General Support' started by latas, Oct 8, 2015.

  1. latas

    latas

    Joined:
    Oct 9, 2013
    Posts:
    149
    Hi everyone. I'm trying to setup the lightmaps of my project but I'm not able to make them work when playing.
    My structure is next.
    On each scene there is only a GameObject with an script attached, which is the Init of the scene. It is that script the one who instantiate each prefab that level needs. So the Map of the level is another prefab too.
    As a result in the scenes of our game there is nothing but a "loader script".
    Then there are one map per level, and other prefabs needed, as controllers, characters and so on.
    In order to create the lightmap I include the prefab and the directional light while I'm in editor mode, not running the game, and then I build the lightmap.
    Here everything works, and I can see in the Scene View how the lightmap is applied.
    I save the scene and I remove the prefabs that I add to do the lightmap, because they will be instantiated in play mode. All of this is working well in 4.6.8.
    Then I enter into play mode, and the lightmap, even it looks appear in the lightning tab of the scene, with the renderer lightmap files, are not applied in the map prefab.

    Why?