How to build lights for materials created in Blueprint?

Newbie question:

Both the object and the light are static. the object has a material. I used “set material” node to replace it with a new material when one button is clicked.

Is the engine going to build light for the new material automatically when I build lights?

Thanks!

Is this a call in editor custom event?

If so, the engine is building light with respect to the mesh, not the matrial, so it may not make much difference.

If you’re changing the material at runtime, then you can’t build light anyway, so it doesn’t matter.

I’m trying to changing the material at runtime, by clicking an UMG button.
So you meant the mesh is no longer “static”, and I should change my light to “dynamic” or “movable” as well?

Thanks!

You can change the material at runtime, no problem, but light will not get rebuilt. The mesh can stay static :slight_smile: