How can I change graphics settings via code/bp?

Hello,
How can I change the graphics settings (fullscreen, res, v-sync, etc.) in code/BP. Because I want to make an Setting screen ingame for users to change values.

Kind Regards

There is a SetScreenResolution function in UGameUserSettings for this. You can call ApplySettings to apply this.
The ShooterGame sample is a good example of its usage.

And how can I change v-sync, texture detail, etc.?

The GameUserSettings class contains
ScalabilityQuality which is of type Scalability::FQualityLevels. This has settings for ResolutionQuality,ViewDistanceQuality and so forth.
You can also call SetFromSingleQualityLevel on this which takes an int where:
0:low, 1:medium, 2:high, 3:epic

The GameUserSettings class also contains a bool:
bUseVSync

Ok thank you

How can you access this in blueprints? I would like to set graphics in game using low, mid, high and epic.

You should be able to call SetOverallScalabilityLevel in GameUserSettings

Hello, I’ve tried changing SetOverallScalabilityLevel on button click in a widget, but I don’t see any changes (neither graphic nor in FPS). Is there a config file I should setup ? Thank you very much for your time.

In case anyone else comes across this post like I did, after calling SetOverallScalabilityLevel, you’ll need to then call ApplySettings. :slight_smile:

1 Like