100% not a graphics guy here.
Randomly discovered this when showing the project to a friend after not touching it for over a month (been working on other stuffs). First I noticed that either the flashlight was super dim, or the main material of the room was a tad darker than it should be: things weren't being illuminated enough by it. Then I noticed that in this small pillar setup the spotlights aimed down at the pillars weren't working, at all. Upon tinkering I discovered that they were working after all, but only at specific ranges/distances/angles/whatevers. No idea what triggered this: the first backup without this glitch was made in the middle of some basic level design work. The project uses built-in RP, Unity 2021.3 (originated in 29, updating to 31 changed nothing).
I would love to save this project. Since it is to become much bigger (hopefully), in case this happens again I need a better solution (and understanding of wtf happened) than just carefully rebuilding everything one asset at a time in a new project. Without one, I might as well switch engines now, but I'm trying to avoid that for this one last Unity project because time and laziness.
- As far as I can tell, all project settings between that one perfectly working backup and the latest messed up version are identical;
- Material settings are identical;
- Point lights work as expected, I believe, but as was discovered with the flashlight, it seems lighting in general isn't quite working as it was set up. Kinda like what happens when you switch to URP from setting everything up in built-in RP;
- Newly created spot lights in this project work in the same flickery fashion;
- Exporting the entire project and importing it into a new one doesn't help, so I assume the problem is tied to one of the assets..? However -->
- Removing all optional packages didn't help;
- Removing all other objects from the hierarchy didn't help;
- I assume I am missing something stupidly obvious and ready to absorb the knawledge (☝️).
EDIT. Nope, no idea. I ended up putting a band-aid on it: adjusted the ranges to random values at which the lights randomly start working (works fine for now but would be very annoying to create new things with this bug around). About time I switched to Unreal anyway: not interested in paying Unity taxes. Big thanks to everyone who tried to help!