Both sides previous revision
Previous revision
Next revision
|
Previous revision
Next revision
Both sides next revision
|
lightmapsettings.lightprobes [2021/05/07 17:47] 60.8.123.10 old revision restored (2021/02/09 18:02) |
lightmapsettings.lightprobes [2021/05/20 16:57] 52.81.126.125 old revision restored (2021/05/10 17:24) |
| |
===== LightmapSettings.lightProbes ===== | ===== LightmapSettings.lightProbes ===== |
//Honestly, I'm still fairly fuzzy on how this field works. Here's the best of my knowledge. | |
// | |
* The ''LightmapSettings.lightProbes '' stores the light probes //all// scenes currently loaded. It is a single merged array of lightProbes, which is updated whenever a scene is additively loaded or removed. | * The ''LightmapSettings.lightProbes '' stores the light probes //all// scenes currently loaded. It is a single merged array of lightProbes, which is updated whenever a scene is additively loaded or removed. |
* When a scene is unloaded, LightmapSettings.lightProbes will still | * When a scene is unloaded, LightmapSettings.lightProbes will still |
* The Object ''LightmapSettings.lightProbes'' lives within the active scene's ''LightingData.asset'' lighting asset. | * The Object ''LightmapSettings.lightProbes'' lives within the active scene's ''LightingData.asset'' lighting asset. |
* Changing the active scene in the Editor changes the ''LightmapSettings.lightProbes'' reference to the active scene's lighting data. If the active scene does not have valid lighting data, the old light probes are left in the lighting cache. | * Changing the active scene in the Editor changes the ''LightmapSettings.lightProbes'' reference to the active scene's lighting data. If the active scene does not have valid lighting data, the old light probes are left in the lighting cache. |
* If you try to set LightmapSettings.lightProbes, this can result in an error "[[https://issuetracker.unity3d.com/issues/lighting-assertion-failed-on-expression-pred-star-previous-star-i-is-thrown-on-additively-adding-a-new-scene-to-a-baked-scene|pred(*previous, *i)]]" | |
| |
There is no way to manually specify light probes, as far as I'm aware. The only mutable field on ''LightmapSettings.lightProbes'' are the spherical harmonic values (''LightmapSettings.lightProbes.bakedProbes''). You can blend and modify the lighting values of the probes, but there is no way to fully create new probes at runtime, even if you have the positions and values. Probes cannot be moved at runtime, because the positions array has no setter. | There is no way to manually specify light probes, as far as I'm aware. The only mutable field on ''LightmapSettings.lightProbes'' are the spherical harmonic values (''LightmapSettings.lightProbes.bakedProbes''). You can blend and modify the lighting values of the probes, but there is no way to fully create new probes at runtime, even if you have the positions and values. Probes cannot be moved at runtime, because the positions array has no setter. |
| |
''LightmapSettings.lightProbes'' will be null if there is no valid lighting data in the active scene. | |