Issues when changing resolution from in-game menu

I have a function that executes this code for changing resolution:



void UMyGameSettings::ApplyResolution()
{
	FIntPoint screenRes(m_resolutionX, m_resolutionY);

	// also save the values in the base class variables (not exposed in the blueprint)
	ResolutionSizeX = m_resolutionX;
	ResolutionSizeY = m_resolutionY;
	
	EWindowMode::Type NewWindowMode = GetFullscreenMode();

	{
		IConsoleVariable* CVar = IConsoleManager::Get().FindConsoleVariable(TEXT("r.FullScreenMode")); 
		CVar->Set(NewWindowMode);
	}

	FSystemResolution::RequestResolutionChange(m_resolutionX, m_resolutionY, GetFullscreenMode());
}


After the resolution has been applied correctly I can see that the attachments on the pawns are gone and the log is full of warnings:

http://s18.postimg.org/qkhovhjgl/Res_change.jpg.

What is the correct way for changing resolution?

Have you tried to just call a Console Command?


GEngine->GameViewport->ConsoleCommand("r.SetRes 1920x1080f");

does that for me.

Thanks for the reply, that works, I am just trying to do it in another way to avoid doing some operations more than once (when I change the resolution I also change many other settings).
I have found that my problems are not related to the resolution change directly but with the change of scalability values in ScalabilityQuality.
I am still investigating but maybe the order in which I call the updates has something to do with it.
I will update with any news if I find out something more.

Ok everthing works now. The issue is changing EffectsQuality in scalability at runtime, it seems to break the pawn’s attachments and gives many warnings in the log.
If I avoid that one everything works fine.