Disabling Lumen Through Code

Hey guys,

I don’t use Lumen. I don’t think it’s particularly performant yet so I stick to baked lighting. It’s getting really tedious to go through the project settings and change stuff every time I open a project, so I’m trying to make a toolbar plugin where I click a button and it changes the settings for me, specifically the Dynamic Global Illumination Method and Reflection Method settings. I’ve been going through the engine’s source code, documentation, and whatever else I could find online, and I can’t seem to change these settings in C++. does anyone know if it’s even possible and if so how to do it?

What about?

image

How do I do that in C++?

That doesn’t seem to work. My class isn’t an actor, it’s an empty class, so I can’t use GetWorld. I’m also really confused about the *Final and TEXT() stuff.

Well you need to read up on FString-s then.

If you look into the definition of that function it is basically calling "GEngine->Exec(UWorld, Command);

Just because you have empty class does not mean you cannot store the reference to UWorld there anyway, since it is obviously needed to execute commandline commands. I believe you are intancing it somewhere where there is some way of getting the reference that can be passed along.

The FString and TEXT has something to do with text encodings. Crash course: UTF-16 string literals are created by using “L” before any string literal you type in code e.g. ‘L"This is utf16 encoded string"’ TEXT - macro is macro that depending on the settings will either put the ‘L’ there or won’t so you can create either const wchar_t* or const char* just by changing one define somewhere. (Windows has _T())… FString has overloaded operator* so when you use FString() you’ll get underlying data as const TCHAR… TCHAR is again type that is either char or wchar_t depending on the previously mentioned settings.

This is the variable I’m trying to change:

This is my code:

I am not certain why that doesn’t work. It acts like the DynamicGlobalIllumination variable doesn’t exist… but clearly it does.