Changing UI Scale in UE4

UI scaling is a pretty standard feature of modern games. It lets players change how large the UI is shown, and is especially usseful for those playing on 4K monitors or TVs far away.

Luckily in UE4 it’s simple to do in C++, and works alongside any DPI scaling rules you may have.

// Instead of reading from GameUserSettings, in this example
// we hard-code a UI scale of 200%
const float CustomUIScale = 2.0f;

UUserInterfaceSettings* UISettings = GetMutableDefault<UUserInterfaceSettings>( UUserInterfaceSettings::StaticClass() );

if ( UISettings )
	UISettings->ApplicationScale = CustomUIScale;