How to change the Light2D.volumeOpacity value by script?

Hello everybody,

How can i change the Light2D.volumeOpacity value by script?

To access the component, I added using UnityEngine.Experimental.Rendering.Universal, this works. I can also access the volumeOpacity value but I can’t change it!

1 Like

The error is:
The property “Light2D.volumeOpacity” cannot be assigned. They are read-only.