Hey all!
I’ve made a light bulb mesh, with accompanying PointLight into a Blueprint in hopes of speeding up the lighting process of my scene.
The PointLight is set to Static, and I was wondering if there’s anyway to “expose” the intensity value to the editor outside of the blueprint.
I.e. I don’t want to make a variable and change it on BeginPlay, since it needs to bake.
Is this at all possible or will I simply have to bite the bullet on the ones I want different values for?
Thanks in advance!
Well you gotta make a variable. But instead of setting the properties of the pointlight on begin play, set it on construct. Construction graph is basically baked code, and lights changed in the construction graph will bake as needed.
Construction graph is also the best way to make code place meshes into the world for you, among other things.
https://forums.unrealengine.com/core/image/gif;base64
First drag your light component (circled in red on the far left) onto the Construction Script grid, and choose Get Light. Then, drag a pin off of that and search for Intensity to find the Set Intensity node. Right click on the New Intensity input and promote it to a variable. Then, select that variable and toggle the option for “Instance Editable.”
Compile the blueprint once to expose the default value (seen at the bottom right).
Now, when you place this actor within your scene, it should have an intensity value you can edit within the editor, and this can be done for each light.