I seem to have a problem with lighting in my game that is not present when using the play function in the Unity Editor, and only occurs when I play the game via sideloading it onto my Quest 2.
From many points in the room, the room is brighter than it’s supposed to be.
When I stand at a very specific point, however, the room turns as dark as it is meant to appear.
Furthermore, pointing the spotlight (flashlight) at certain objects like the lamp will illuminate the whole lamp, even if the flashlight is barely pointed at it.
Any ideas on how I can fix this?
I am using 2 point lights and a directional light in the scene in addition to the flashlight.
I have noticed a fair bit of glitchiness when I have multiple lights in my scene.
My current understanding is that because of the way I render everything (which is not baked because of moving objects), having anything more than a single light starts to really cripple performance. I have two players in a scene, each with their own flashlights, in addition to the scene’s lighting (which seems to be global illumination even though I am reasonably certain I told Unity to not do that, but I digress), I get a drop from a solid 72FPS to around 14FPS.
Another issue is that “Project Settings/Quality/Rendering/Pixel Light Count” determines how many lights you can have in your scene. If you have too many, you get weird results. In my app, it will look like the two lights are “fighting” over who will render, for lack of a better description.
So in short, yes, you will get all kinds of weirdness from Unity and the Quest when you have too many lights, etc. Best bet is to have a single light, baked lighting, and minimize vertex counts, passes, etc.