- Home /
Set Light Probes at Runtime
I have a scene using baked lightmaps and we would like to turn on light probes representing street lights at a certain point. We could control this by toggling objects to use/not use probes, but we would prefer to simply change the light probes. To be clear we have pre-baked LightProbes and we would simply like to switch them in. For instance dragging them to the Lightmapping settings during runtime accomplishes this.
The LightmapSettings.lightprobes docs are a bit terse but they certainly make it sound like this should be supported. "Holds all data needed by the light probes. It can be swapped to a different pre-baked one at runtime."
I attempt to do this simply by
LightmapSettings.lightProbes = probesToUse;
inside of a conditional in Update. This does not raise an exception but it also does not do anything (no change in the Lightmapping panel). We do not have any light probes set for the scene before this point. Is there some particular way that one switches light probes during runtime?
I am running 4.6.3.
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
Illuminating a 3D object's edges OnMouseOver (script in c#)? 1 Answer
Flip over an object (smooth transition) 3 Answers