- Home /
Runtime Meshes with Emissive Lighting?
Hi Folks!
Is there any way to get emissive materials (or a similar effect) working on meshes loaded at runtime?
I have a game that loads a series of meshes (some are Unity prefabs, others are .OBJs) at runtime, and I'd like for some of them to illuminate nearby surfaces. These runtime meshes don't move, but their positions are dictated by user input (or data files).
E.g. building a dungeon tile-by-tile where some surfaces are lava, or a computer monitor that casts light
Emissive materials seem to be the preferred way to achieve this, but they don't seem to work on runtime meshes, only meshes placed in the editor with "static" applied. I'd be okay with the user hitting a "recalculate" button at runtime to generate new GI, but so far can't find a way to do so.
I guess I could also drop point or other light sources near the emissive surfaces, but that seems a bit blunt. It'd probably also make asset creation a bit clumsier.
Any other tricks to achieve this effect?
Thanks!
Doing some further research on reddit, I came across this:
https://www.reddit.com/r/Unity3D/comments/362i0d/how_do_you_make_dynamic_objects_emit_light/
Which seems to suggest the point light method is indeed the (only) way to go. I guess if that's it, that's it.
Though I'm definitely interested if anyone's found other tricks!
Your answer
![](https://koobas.hobune.stream/wayback/20220612080712im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Emissive realtime light not working on Unity 2017.1? 2 Answers
changing cubemap at runtime 0 Answers
How to change a specific material of an object ? 0 Answers
Apply a new texture at runtime to slowly cover the transform 1 Answer
Changing material at runtime messes up with prefab materials [Solved] 1 Answer