I have written a custom thread derived from FRunnable, and I want to modify and apply some variables such as GameUserSettings and ViewTarget from this thread. But when I run these code below, the editor triggered a breakpoint at the engine source code and the comments said: CVar Changes can only be initiated from the main thread.
GEngine->GameUserSettings->ScalabilityQuality.EffectsQuality = atoi(split[6].c_str());
GEngine->GameUserSettings->ApplyNonResolutionSettings();
Is there any way to do it or can I delegate these task to GameThread?
Thanks a lot!
update: I found a class “FEvent” which seems to be useful about this problem,but I don’t know how to use it…