I am behind this thing since a couple of hours now and can’t find the problem.
I have 2 lights in the scene: a point light used only for lightmapping, a directional light used for dynamic objects and shadows.
There are some dynamic objects on the layer DYNAMIC and a static mesh on the layer STATIC.
Point light is culling set on STATIC layer, directional is culling set on DYNAMIC and STATIC layer because I would like dynamic objects to cast shadows on static layer.
On the editor everything looks fine: the static mesh only has lightmap rendered.
On the player things change…
If I set the LIGHTMAPPING parameter as AUTO on the directional light, then only the dynamic objects receive shadows.
If I set the same parameter to REALTIME ONLY then I have the shadows… but the static mesh is receiving the light of the directional light as well, resulting in an overexposure.
My question is: is this a correct behaviour?
Isn’t it supposed to work that I can have some lights to render the static environment and make it uberfast to render and still have the chance to have shadows projected on it?
Or a light that is working on the static meshes to receive shadows must be enabled on them MANDATORY at lightmapping projection?
This looks weird to me: can’t I just make a directional light that will NOT be part of the lightmapping calculation and use it just for projecting shadows and light dynamic objects???