I am very new to both C# and Unity, so I have been following some tutorials to create a Wall Torch (GameObject) that has a child 2D Spot Light which flickers using the following script I found on Github. https://gist.github.com/sinbad/4a9ded6b00cf6063c36a4837b15df969 According to Visual Studio, the script has no errors.
However, upon hitting Play to start the script, nothing happens. There are no errors or messages in the Console.

I have attached the script as a component to the 2D light, and made sure the class and script name are identical.
I have tried restarting the project and creating a new one, as well as deleting and recreating the script. The Unity project is 2D with URP.
I really appreciate any help.
Light2D!=Light=>GetComponent<Light>will returnnull... the script stupidly hides this withif (light == null) return;and makes the whole component silently fail .. one of the classic cases where you WANT to get an exception rather than hiding it ^^