HDRP area tube light. Need to set it to 8000000 Lumens IN CODE (doesn't work)

I have a light source descending from the sky at night and I need it to illuminate A LARGE RANGE around it as it falls. It worked in 2021, but upgrading to Unity 6 I find I can’t set the emission lumens to 8000000 through code. I can set it to that crazy number in the Editor but then I need to fade as time goes on in code. When setting Light.intensity = 8000000 in code the editor shows it to be 0.0000000000225f.

If there is a better way to do this please let me know.

Thanks in advance.

It is a bit cumbersome, the API changed as the doc states it, and you should use ConvertIntensity(Light, float, LightUnit, LightUnit) first, then Light.intensity.
8000000 is quite a high intensity value though, it feels like some misuse here …

1 Like