So I have a single level, with in it, I have multiple levels, each one of them have static meshes and point lights, I’m looking for turning on the lights visible toggle (not necessarily automatically) when I enable night mode in UDS (Ultra Dynamic Sky Blueprint in FAB)
I Figured out that I might drop a blueprint inside the main level and in it’s property I can toggle all the lights on/off manually, so that I can’t be bothered by lights when the sun is out in UDS settings, cause they drop down performance and well, it’s daytime! but when I toggle night mode in UDS, I can also toggle all the lights on in all sub-levels, instead of manually opening each sub-level one by one, selecting all the lights, and turning the visibility option off!
thanks for helping or pointing to the correct solution so I can search for it on YT
not sure if you want to run this on the construct or in some custom function that you can call anytime you need to toggle the lights state. NOT node reverses the state of the bool
thanks for the reply, yes it’s actor, can you please copy and past this blueprint as a reply here? I don’t know how to do it, I found that on other threads, actually this is my first ever blueprint and I’m a total noob at this stage, I tried to fetch the components by name, this is how far I’ve got:
you’;re almost there. just drag the mouse from the output (right side) of point light component noed and release the mouse button and type 'visible and you will see the note to choose and then from visible drag again and press ! (! is NOT in programming) and you will get the not boolean and then k
just connect
thank you so much for the detailed Instructions, I followed through, however, it’s only working in editor and while the tick (actor hidden in game) is enables
otherwise, when I drop the blue print inside the level, it’s not doing anything
however, when rendering the camera sequence, the lights are always off, no mater if the blue print is visible or not!
to be more clear, as you can see, the level has sub-levels in it, each one has point lights in it that has their visibility check off, because I only use them when I want to make some night shots, or brows the level in night mode in editor, but most of the time I’m always in daytime mode

that’s why I’m looking for a simple blueprint that stays in the main level and I can click on it’s properties and tick enable lights (for example) and suddenly, all the lights in the sub-levels are turned on! in editor and when rendering is sequencer, then I go to night mode in UDS, and voalla! it’s night time!
I appreciate your help
My favourite way to do this is to create callable functions so it looks like this:
To do this, create two functions, one for LightsOn and one for LightsOff. In the functions details panel select/tick “Call In editor”:
Then this is the functions for setting the light to visible (for pointlights)
Light on/visible function:
Lights off/hidden function:
The other way that eldany.uy already has shown is instead toggling all the pointlights in the level and sublevels, meaning that if a light is off, its gets set to on (and the other way), which is useful if you have different types of pointlights for day- vs night- time.
thanks for replying, I tried to implement your solution, however it didn’t work, and I noticed that lights on function is the same as lights off function, is this ok? I’m a total noob at this stage.
earlier, when I was trying to replace the old script with yours, the lights was on, then I inserted your blueprint, and pressed lights off function, and it did work, however it never turned on back again
Sounds like you missed to tick the New Visibility in the Set Visibility for the LightsOn function.
That’s basically the only thing that makes them different, which makes the light turn on
sorry, my bad, I’m new to this. thanks it works now, but only in editor, but either way, even the other solution from eldany, they don’t show up when rendering in movie render que! I don’t know why
How do you mean?
Would you like the light to change in the video rendered from the movie que or would you like to change it before rendering?
thanks for answering, what I’m saying is that after turning lights ON from the blueprint properties tab, they turn on in the editor, but in the movie render que they are still OFF! even though I can see them ON in the editor! but when I hit render, they appear to be OFF! that’s strange!
this is what I see in the editor:
vs what actually gets rendered:
I think it’s because there is sub-levels, when I try this in a single level it works… is there a possible fix? cause I use unreal to render videos as my main use case is in visualization. and I have to use sub-levels cause I’m building a big city
Thats indeed weird. I will try to set up a test scene and see whats happening when I have access to unreal