2d lighting flicker effect

So I’m making a horror type game in 2d, top down style. Everything is dark, and I want a light to be flickering around the character to add more to the horror element. I’m using the lightweight render pipeline (in case that makes a difference) and can’t seem to be able to reference the lights in my script. I’m using a 2d point light, just in case that helps. Is there any way to accomplish this kind of effect?

I know this is an old post but it was the first that came up when I searched. Don’t know if this is the best way but worked for me. I was doing some light transitions based on bounds.Contains() and ended up using a similar script to flip my lights on & off. In my example the script is not attached to the light object so you would need to assign your light object in the inspector to “myLightObject”. Changing the WaitForSeconds would change the amount of time between lights toggle on and off. If you want to get a little fancier & aren’t a fan of the static time transitions you could probably use Random.Range() to change the WaitForSeconds value.

public class LightFlicker : MonoBehaviour
{
   public GameObject myLightObject;
   public bool isLightOn;

    private void Start()
    {
        isLightOn = true;
    }

    private void Update()
    {
        if (isLightOn == true)
        {
            StartCoroutine(TurnLightsOff());
        }
        if (isLightOn == false)
        {
            StartCoroutine(TurnLightsOn());
        }
    }
    
    IEnumerator TurnLightsOff()
    {
        yield return new WaitForSeconds(3.075f);
        LightsOff();
    }

    void LightsOff()
    {
        myLightObject.SetActive(false);
        isLightOn = false;
    }

    IEnumerator TurnLightsOn()
    {
        yield return new WaitForSeconds(3.075f);
        LightsOn();
    }

    void LightsOn()
    {
        myLightObject.SetActive(true);
        isLightOn = true;
    }
}