Download

Android quality settings at runtime

It’s possible to change quality settings at runtime in android game ?
(for example have slider low/mid/hight details in settings menu).

I’v made such a slider and tried to adjust some parameters based on the slider, this works fine in editor, in mobile preview, but does not work
in actual game deplyed on device.

My first try was to use:



APlayerController *TargetPC = ...

switch (Settings)
{
	case 0: // Low
		TargetPC->ConsoleCommand(TEXT("r.ScreenPercentage 50"), true);
	break;

	case 1: // High
		TargetPC->ConsoleCommand(TEXT("r.ScreenPercentage 100"), true);
	break;
}


works fine in editor, in mobile preview, but does NOT work in actual game …

second attempt:


Scalability::FQualityLevels NowLevels = Scalability::GetQualityLevels();

switch (Settings)
{
	case 0: // Low
		NowLevels.ResolutionQuality = 50;
		NowLevels.TextureQuality    = 0;
	break;

	case 1: // High
		NowLevels.ResolutionQuality = 100;
		NowLevels.TextureQuality    = 2;
	break;
}
	
Scalability::SetQualityLevels(NowLevels);

again works fine in editor, in mobile preview, but does NOT work in actual game …

It’s possible at all to change textures quality / resolution scale at runtime, if yes … how ?
There are a LOT of topics on how to change quality in editor/preview, but none of those work in shipment build :confused:

Hi,
scalability settings work via cvars and are set according to a priority described in ‘enum EConsoleVariableFlags’. There’s a good chance your settings are being ignored. To be sure, could you type ‘sg.ResolutionQuality’ in to the console and note down the ‘LastSetBy:’ response.

console gets built out in shipped builds if im not mistaken, is there a way to keep it in?

that said i too would like to know the ideal way of doing this - ive noticed the only console command that actually works at runtime is draw distance multiplier and draw distance quality - everything else is unresponsive

bump … anyone ?