Light color doesn't change after switching between enum variables

Good day. I’m trying to do a simple blueprint that would allow to change color of the light to a few predefined presets. I created enum and added Switch node to the event graph, but for some reason it doesn’t work. My script:


I’m struggling to understand what I’m doing wrong, can anyone please point out on my mistake? Or another way to achieve what I’m trying to do with light’s color.

You should convert it to a function and drag in incoming enum to the function input node to expose it as a parameter. Then call the function when needed.

Can’t say for certain but your colors appear to be fully transparent. Try making them opaque.

Additionally, the Event Graph runs in game time, while the construction script runs in the editor. So if you’re trying to see results appear in the editor, place it on the Construction Graph.

Thank you, that was my mistake! I forgot to connect the construction script node to my switch node, and it worked flawlesly after that. What I have now should do the job, but 3dRaven’s suggestion about functions is interesting. I have no experience with blueprint functions yet and definitely would take a closer look into this topic later.