# How to generate lightmap uv for multiple meshes

**URL:** <https://forums.unrealengine.com/t/how-to-generate-lightmap-uv-for-multiple-meshes/626690>\
**Category:** Rendering\
**Tags:** unreal-engine, UE5-0, Lightmap, Lighting, question\
**Created:** [August 11, 2022, 10:35pm UTC](https://forums.unrealengine.com/t/how-to-generate-lightmap-uv-for-multiple-meshes/626690 "2022-08-11T22:35:09Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![faqu](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@faqu](https://forums.unrealengine.com/u/faqu)\
**Post date:** [August 11, 2022, 10:35pm UTC](https://forums.unrealengine.com/t/how-to-generate-lightmap-uv-for-multiple-meshes/626690/1 "2022-08-11T22:35:09Z")

</div>

how to generate lightmap uv for multiplr meshes?  
the property matrix doesn’t have generate lightmap uv option

---

<div class="post-metadata">

**Author:** ![SupportiveEntity](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SupportiveEntity](https://forums.unrealengine.com/u/SupportiveEntity)\
**Post date:** [August 12, 2022, 2:55am UTC](https://forums.unrealengine.com/t/how-to-generate-lightmap-uv-for-multiple-meshes/626690/2 "2022-08-12T02:55:09Z")

</div>

Hey there @faqu! Welcome back to the forums! It’s a bit odd to hear it’s not in the property window at all, this is somewhat a problem since most of the documentation requires at least one of the property windows to contain the checkbox for it. Nonetheless you can always check the generate checkbox in the static mesh editor. A bit of documentation so you can see what I mean is here: [Generating Lightmap UVs in Unreal Engine | Unreal Engine 5.0 Documentation](https://docs.unrealengine.com/5.0/en-US/generating-lightmap-uvs-in-unreal-engine/)

Hope this helps!

---

<div class="post-metadata">

**Author:** ![faqu](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@faqu](https://forums.unrealengine.com/u/faqu)\
**Post date:** [August 12, 2022, 3:02am UTC](https://forums.unrealengine.com/t/how-to-generate-lightmap-uv-for-multiple-meshes/626690/3 "2022-08-12T03:02:55Z")

</div>

thanks for the info, im already aware of the checkbox in the static mesh editor, the problem is i want to generate lightmap uv for every object and cant find a way to do it. when i select every object and enter property matrix, there isn’t an option for generating lightmap UV

---

<div class="post-metadata">

**Author:** ![SupportiveEntity](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SupportiveEntity](https://forums.unrealengine.com/u/SupportiveEntity)\
**Post date:** [August 13, 2022, 12:27am UTC](https://forums.unrealengine.com/t/how-to-generate-lightmap-uv-for-multiple-meshes/626690/4 "2022-08-13T00:27:40Z")

</div>

Hrm, I don’t know if there’s any way to do it en masse without writing a script to do so. Could probably make an editor plugin to use the SM editor’s logic and set all SM’s project wide like that, I’ve not done too much automation engine side myself. If this sounds like the route you’d like to take, I’ve got some documentation for you! [Scripting and Automating the Unreal Editor | Unreal Engine 5.0 Documentation](https://docs.unrealengine.com/5.0/en-US/scripting-and-automating-the-unreal-editor/)

Other than that, I’m not aware of being able to change those settings en masse.

---

<div class="post-metadata">

**Author:** ![chinohead](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@chinohead](https://forums.unrealengine.com/u/chinohead)\
**Post date:** [December 12, 2022, 12:59pm UTC](https://forums.unrealengine.com/t/how-to-generate-lightmap-uv-for-multiple-meshes/626690/5 "2022-12-12T12:59:38Z")

</div>

This was a custom tool we had to make ourselves, ago with a few other lightmap options.

---

<div class="post-metadata">

**Author:** ![2latemc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@2latemc](https://forums.unrealengine.com/u/2latemc)\
**Post date:** [May 3, 2024, 5:48pm UTC](https://forums.unrealengine.com/t/how-to-generate-lightmap-uv-for-multiple-meshes/626690/6 "2024-05-03T17:48:07Z")

</div>

I know this is a little late, I also had this problem so I made a little tool for that.

For this you need to create an **Editor Utility Widget** that inherits from the **Editor Utility Actor** class in the create actor menu.

Now create a new function, call it something like EnableGenerateLightmap UVs and make sure that “Call In Editor” is checked, or this wont work.

Not use this simple snipped to enable the stuff, I am using Begin Transaction and End Transaction to make the undo work for the objects.

 ![Screenshot 2024-05-03 194317](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/2/6/c263707eda8ad43bad93c3a9e322cd64380c5b7e.png)  
 ![Screenshot 2024-05-03 194335](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/2/4/924de86acaecd01ba1185ae7bfaa535ad9acd35c.png)  
Now to call the action, select the assets you want to enable and right click → Scripted actions → EnableGenerateLightmaps (or whatever you called it)
