- Home /
Lights only sometimes working
I am creating a light in my scene using a script activated by a button press. This is working fine (creating the light) but only seems to render once. If I stop playback and then start it again and repeat the same action (without changing my script) the light no longer appears to render (although it is created).
Now if I PAUSE my game after the script has created my light and adjust any of it's attributes in the inspector the light suddenly renders in the game window and affects the plane below it as it should be doing all along.
Interestingly if I delete my plane and create a new one it starts works again (but only once, next time I run the game the light does not render)
What's going on here? Is it because I'm using the free version?
Can you post the script causing this issue? Without it anyone trying to help will just be taking a stab in the dark.
Answer by Despiracy · Nov 11, 2010 at 01:59 PM
Have you checked the render settings? Number of per-pixel lights to render. I had this problem in a scene with lights turning on and off because my per-pixel lights was too low.
Your answer
Follow this Question
Related Questions
Diffuse 2-sided shader only accepts light on one side? 2 Answers
Trying to create 2D pixel art lighting 1 Answer
Realistic Graphic Setup, but how? 1 Answer
How can shining model in URP with shader graph 0 Answers
Playdead's Inside AO decal 1 Answer