Set Light2D sprite via scripting

Hello,

I would like to create an empty object and add to it a Light2D component with a specified Sprite, however, I can’t seem to figure out how to change the sprite of the component via script.

150866-annotation-2020-01-06-120007.jpg

Underlined is the property I would like to change via C#

Try this: Light2D.sprite = yourSprite |OR| Light2D.texture = yourSprite