Hey guys. I’m trying to add light to some rooms in a completely dark scene.
But I can’t find a way to light a single room. Lights always shine trough walls and since there will be a lot of rooms i can’t simply use layers for that. Is there a way to illuminate a room without touching rooms nearby ?
I already tried point lights, area lights(don’t know how they work) and spot lights.
Unfortunately nothing of that worked.
Additionally, I can’t change the light’s range because that would make the room almost completely dark. And I want the room to be bright everywhere.
You need to use lights with shadows enabled, if you have a lot of rooms you might want to consider using baked lighting (which is the only way area lights currently show).
Baked lightning is no options since Objects need to be static then and thus they won’t recieve dynamics lights anymore.
But I won’t the player to walk around with a flashlight.
So I can’t simly bake lights, unfortunately
Static objects with baked lighting can absolutely still receive dynamic lighting, like from a flashlight. Marking objects and static or dynamic allows Unity to do some optimizations on how it treats them for things like physics and occlusion (if you have it enabled). Otherwise baked lighting, or light maps, are just treated like an extra light. Any light that is static (marked as “baked” rather than the static gameobject tag) will get baked into the light map texture and any lights that are dynamic won’t.
Are you sure ? Because I marked a few objects static and they didn’t recieve dynamic lights anymore.
Adjust your flash light settings to realtime should work.
And other baked settings lights only bake lightmap.
I tried on new project and it work.
I found the error. Your suggestions work now, there was something wrong with the lightmap, I don’t know.
I created a new project and did all the same way and it works now. Seems like it has been a bug