# Editor Utility does not work with WorldSettings

**URL:** <https://forums.unrealengine.com/t/editor-utility-does-not-work-with-worldsettings/1852862>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine, question, Blueprint, CPP\
**Created:** [May 12, 2024, 6:31pm UTC](https://forums.unrealengine.com/t/editor-utility-does-not-work-with-worldsettings/1852862 "2024-05-12T18:31:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![4eep](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@4eep](https://forums.unrealengine.com/u/4eep)\
**Post date:** [May 12, 2024, 6:31pm UTC](https://forums.unrealengine.com/t/editor-utility-does-not-work-with-worldsettings/1852862/1 "2024-05-12T18:31:40Z")

</div>

Hello.  
My project has more than 500 levels, which I load through Level Streaming. At these levels there are some models with static lighting. I don’t want to put them into dynamic lighting and I don’t want them to be involved in the light baking process. The only (quick) solution I can see is to set all 500 levels bForceNoPrecomputedLighting = true using Editor Utilitis.

I wrote a function that will do this.

 ![Screenshot_1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/b/d/9bd7d0bee3592d046b2182b3416951a9de915dc6.png)

I wrote the script.

 ![Screenshot_3](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/2/e/62ee65408ac5547cb8ab1a89317378624899ef66.png)

But I get “Cast False” when trying to use the script. I tried using GetSelectedActors instead of GetSelectedAssets, but then I get an empty array.  
Help me understand what I’m doing wrong?

---

<div class="post-metadata">

**Author:** ![Nightwolf](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/nightwolf/32/917179_2.png) [@Nightwolf](https://forums.unrealengine.com/u/Nightwolf)\
**Post date:** [May 12, 2024, 6:36pm UTC](https://forums.unrealengine.com/t/editor-utility-does-not-work-with-worldsettings/1852862/2 "2024-05-12T18:36:21Z")

</div>

Have you already been to this post

> [@How to get reference to selected assets in content browser?](https://forums.unrealengine.com/t/how-to-get-reference-to-selected-assets-in-content-browser/80533/2):
>
> You should be able to simply create a custom variable for your asset in the graph for your static meshes then simply use that variable where it’s needed. Have you tried doing that?

was it of any use to you?

im not familiar with what your trying to do but thought i’d give it at least one try in case it was so simple

---

<div class="post-metadata">

**Author:** ![4eep](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@4eep](https://forums.unrealengine.com/u/4eep)\
**Post date:** [May 12, 2024, 6:48pm UTC](https://forums.unrealengine.com/t/editor-utility-does-not-work-with-worldsettings/1852862/3 "2024-05-12T18:48:41Z")

</div>

This is a little different from what I do) I use the Epic tool to create scripts using Blueprints. Editor Utility Blueprints.

![Screenshot_4](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/a/9/4a921bce79550596bad95308c6941b0f57e8da06.png)

I could use C++ entirely and write a plugin for this. But I’m not sure that I will be able to do this with the existing AWorldSettings. And this is much longer than a simple script. Besides, I don’t really want to add another plugin to the project.
