How to bake a light onto a non-static object?

First off, this feels like a simple question, but I haven’t been able to find the answer anywhere.

Say I have, in Unity, a desk with a lamp on it, which is always turned on, and which just illuminates the desk a bit–in other words it isn’t very bright and doesn’t really affect anything else except the desk top. I want to be able to move the desk around during gameplay, but the lamp can just stay where it is on the desk (the lamp is a child of the desk). As a result, I would like to be able to bake the light just onto the table. Is that possible?

You can choose to only bake selected objects. Then, in order to move the object around in the scene, it has to be reset to non-static by setting the gameObject.isStatic flag to false.

Solution above is not working as expected in animated models like mine: machine with animated doors.
Machine’s doors are not animating anymore, no matter that they are non-static.

My fix in this case is to:

  1. prepare scene as it should be set up in build,
  2. disassemble machine from all moving parts, so every static surface is exposed
  3. turn all problematic elements to “static”
  4. clear baked data
  5. generate lighting
  6. undo (ctrl+z) all changes made to state from 1)

#works_in_my_case :slight_smile: