Editor Utility does not work with WorldSettings

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.

I wrote the script.

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?

Have you already been to this post

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

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

Screenshot_4

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.