How to run any console command in C++?

it can be anything that inherits from uobject (so nearly any basic class in unreal as it’s the base class)

p.s.
you have a typo in your command. You wrote BoloomQuality instead of BloomQuality
try it without the equals sign:
r.BloomQuality 0
r.BloomQuality 1

Also seems like calling it on basic uobjects doesn’t always work, but pushing it to the player controller seems to work a 100% of the time

.h

UFUNCTION(BlueprintCallable)
		static void RunExec(APlayerController* TargetPC, FString Command);

.cpp

void UOverrideR::RunExec(APlayerController* TargetPC, FString Command)
{
	TargetPC->ConsoleCommand(Command, true);
}
2 Likes