Switchable BP_Light to be Lit in the viewport ?

Hello, i have a scenario that i need help with.

I made a light_BP and i made it switchable by the player, so the player can interact with it and toggle it On or Off

But i need to be able to see this light ON in the viewport to be able to create my visual athmosphere and to know where to place it exactly in my level…

However the light is always OFF in the level editor viewport.

How could i do to have an exposed checkbox parameter in the object detail that says something like : Debug On or OFF and actually toggle it ON in the viewport ?

Make it a bool thats instance editable and in the Construction Script have it define if that instance should be on or off by default.

1 Like

Okay great i got it to work.

For other beginners, i made the Bool variable named : “Debug Active” and checked :
expose on spawn and Instance Editable.

Then in the construction script i get this bool and branch it to check if its activated or not.
If yes, (meaning thats you check the “Debug Active” in the detail panel in the level viewport)
i execute my function to toggle the light on and off.

Thanks for your help !

1 Like