Changing DeviceProfile at runtime Tags CVars with ECVF_SetBySystemSettingsIni

This question was created in reference to: [Is changing Device Profiles an acceptable way to change graphic settings at runtime on [Content removed]

I have another question related to the previous issue from above. When changing ScalabilityGroups settings at runtime by overriding the active DeviceProfile, it automatically tags the CVars with “ECVF_SetBySystemSettingsIni” which prevents changing the same CVars individually (eg; userSettings->SetShadowQuality(newQuality) + userSettings->ApplySettings(true)) since the priority is then “ECVF_SetByScalability”, which is lower then “ECVF_SetBySystemSettingsIni”.

Right now I have the global graphic settings option (which sets the graphic settings for all groups) using the DeviceSettings.ini override method (manager.SetOverrideDeviceProfile(NewDeviceProfile)), to easily set all Scalability Groups with the values from the DeviceProfile.ini file, but doing so is preventing the individual Graphic Setting options from working, for example:

  1. Change overall Graphics Quality to Epic (device profile is overriden)
  2. Then change the Shadow Quality to Low - doesn’t work anymore because of the issue mentioned above

I’ve started looking at the Lyra sample project, but I’m not yet able to compile that project from source in order to debug exactly what’s happening behind the scenes when changing graphic settings, so I’ve had a bit of a hard time figuring out how the Lyra Graphic Settings options are wired-up.

I could always grab the CVar values from the DeviceProfile.ini, and then update them in a for loop, but it is nice to be able to just override the DeviceProfile and automatically have all the CVars updated hehe..

Any help is appreciated, thank you!

Hi there,

I’d like to suggest avoiding the use of SetOverrideDeviceProfile at runtime for player graphics settings. This is generally not the intended workflow in Unreal Engine. Device Profiles are typically meant for defining hardware or platform defaults, while Scalability presets are better suited for runtime user-configurable settings.

The workflow could look like this:

DeviceProfile.ini

→ Quality Preset Loader

→ Extract sg.*values

→ Build FQualityLevels

→ Scalability::SetQualityLevels

Alternatively, you can follow the approach of the Lyra, which stores quality presets separately and applies them through scalability rather than device profiles:

I hope this helps clarify the issue. Please feel free to let me know if you have any questions.

Best regards,

Henry Liu

Thanks Henry, this does help indeed :slight_smile:

Thank you for the update. Don’t hesitate to reach out if anything else comes up.

Cheers,