It's currently impossible to remove all the lighting in a scene from existing trombackgrounds. This is because the default lighting has two components:
A directional light
Environmental lighting
Unfortunately, we can't just package SceneLightingHelper.cs with TrombLoaderBackgroundProject, since while that would get rid of the environmental lighting, it wouldn't be able to get rid of the lone directional light: Since everybody's Starts are called after the scene is loaded, custom lights would get removed by SceneLightingHelper#Start.
As a result, I propose this lighting removal flow: The background creator adds an empty GameObject named RemoveDefaultLights as the third or later of the camera's children. The rest of the flow is normal. If the version of TrombLoader has this patch, the default lighting will be removed by this code. On older versions, the default lights will just not be removed and that's fine.
Changes
When the trombackground loads, search for a direct child named RemoveDefaultLights and if it's found
Attach a SceneLightingHelper to it
Remove all existing lights in the scene
Testing
Created a trombackground with a RemoveDefaultLights and tested it: Lights removed successfully
After playing a track without default lighting, play one with default lighting: Lights come back
Motivation
It's currently impossible to remove all the lighting in a scene from existing trombackgrounds. This is because the default lighting has two components:
Unfortunately, we can't just package
SceneLightingHelper.cs
with TrombLoaderBackgroundProject, since while that would get rid of the environmental lighting, it wouldn't be able to get rid of the lone directional light: Since everybody'sStart
s are called after the scene is loaded, custom lights would get removed bySceneLightingHelper#Start
.As a result, I propose this lighting removal flow: The background creator adds an empty GameObject named
RemoveDefaultLights
as the third or later of the camera's children. The rest of the flow is normal. If the version of TrombLoader has this patch, the default lighting will be removed by this code. On older versions, the default lights will just not be removed and that's fine.Changes
RemoveDefaultLights
and if it's foundSceneLightingHelper
to itTesting
RemoveDefaultLights
and tested it: Lights removed successfully