# How to build lighting form C++ or BP?

**URL:** <https://forums.unrealengine.com/t/how-to-build-lighting-form-c-or-bp/461247>\
**Category:** Rendering\
**Tags:** build-lighting, unreal-engine, question\
**Created:** [February 2, 2020, 9:14pm UTC](https://forums.unrealengine.com/t/how-to-build-lighting-form-c-or-bp/461247 "2020-02-02T21:14:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_2709d010](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2709d010](https://forums.unrealengine.com/u/anonymous_user_2709d010)\
**Post date:** [February 2, 2020, 9:14pm UTC](https://forums.unrealengine.com/t/how-to-build-lighting-form-c-or-bp/461247/1 "2020-02-02T21:14:21Z")

</div>

I have a huge open world setup for which I would like to build the light information for selected levels only in a batch during night time. I want to be able to perform some pre-build operation like setting up the directional and skylight information depending on the level setting.  
I was wondering if I can do that from a BP or more likely a C++ program. I did some snooping around but wasn’t able to figure out how to do it.  
Can anybody point me in the right direction?

---

<div class="post-metadata">

**Author:** ![EuroBendel](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@EuroBendel](https://forums.unrealengine.com/u/EuroBendel)\
**Post date:** [September 26, 2023, 11:49am UTC](https://forums.unrealengine.com/t/how-to-build-lighting-form-c-or-bp/461247/2 "2023-09-26T11:49:33Z")

</div>

You can build lighting like this from C++:

`FEditorBuildUtils::EditorBuild(GWorld, FBuildOptions::BuildLighting, false);`

Must probably be called in an Editor Module.
