I need to change the sprite of a 2D light in a script. I need to create a Light2D with a light type Sprite and then in the script change the sprite to whatever I need. I looked at the object and all I can see that is is a sprite is lightCookieSprite that is only get-able. Code (CSharp): GameObject glowComponent = Instantiate(new GameObject("GlowComponent")); Light2D light = glowComponent.AddComponent<Light2D>(); light.lightType = Light2D.LightType.Sprite; light.??? = sprite; How can I change the sprite like in the inspector?