Tech is there, unreal lyra project can do it, so should be doable in unreal.
Sorry i did not dig deep enough in this to help you more.
For now i am happy with just executing “Set res” command.
There is: “Set Screen Resolution” and here is topic about why it fails:
And here is C++ code for it:
#include "Engine/GameUserSettings.h"
void SetScreenResolution(const FVector2D& NewResolution)
{
// Get the game user settings object
UGameUserSettings* GameSettings = GetGameUserSettings();
// Check if the game settings object is valid
if (GameSettings)
{
// Set the screen resolution
GameSettings->SetScreenResolution(FIntPoint(NewResolution.X, NewResolution.Y));
// Apply the settings without triggering a confirmation dialog
GameSettings->ApplySettings(false);
}
}
PS. imo best way to see how to do it is loading lyra and going trough what they did there, i know its complicated project, but i think they did that and lots of other things the proper way.