Scripted Light2D Component - Sorting Layers

Just got 2D lighting and the URP up and running, but I’m rather new to all this.

Is there a way to set the sorting layers for a script added Light2D component? It defaults to the Default layer, and there doesn’t seem to be a way to change it.
Am I just not using the Light2D component as expected?

I’m hoping to control global lighting during the most of the day cycle and then switch it to a directional style light during dawn and dusk, which is why I’d like to be able to play with the sorting layers at runtime.

Thanks in advance!

6391001--712487--ss - Copy.png
Opening the script, I’m not seeing any public field, property, or setter. That means that your best bet might be reflection: int[ ] m_ApplyToSortingLayers

Could blend styles work for what you want to accomplish? Without reflection, you can set the blendStyleIndex. You could have dawn and dusk blend styles each claiming a different mask channel.

Thanks for the suggestion, Lo-renzo!
Masking does look like it helps the lights look like they have a lot more depth, but it won’t help my dynamically created lights ability to shine on a background or foreground sorting layer.

What I did for now, was create a prefab that has the light component with the layers I want to use, and then just instantiate them as required.

Still seems like I’m missing something though. Are sorting layers not something that are expected to be changed at runtime?
I will poke around the Light2D script a bit more and look into the possibility of reflection.