UGameUserSettings

Inheritance Hierarchy

Syntax

UCLASS (Config=GameUserSettings , ConfigDoNotCheckDefaults)
class UGameUserSettings : public UObject

Remarks

Stores user settings for a game (for example graphics and sound settings), with the ability to save and load to and from a file.

Variables

Name Description

Protected variable UProperty Config

int32

 

AudioQualityLevel

Protected variable UProperty Config

bool

 

bUseDesktopResolutionForFullscreen

Whether or not to use the desktop resolution.

Public variable UProperty Config

bool

 

bUseVSync

Whether to use VSync or not. (public to allow UI to connect to it)

Protected variable UProperty Config

int32

 

DesiredScreenHeight

Desired screen height used to calculate the resolution scale when user changes display mode

Protected variable UProperty Config

int32

 

DesiredScreenWidth

Desired screen width used to calculate the resolution scale when user changes display mode

Protected variable UProperty Config

float

 

FrameRateLimit

Frame rate cap

Protected variable UProperty Config

int32

 

FullscreenMode

Game window fullscreen mode 0 = Fullscreen 1 = Windowed fullscreen 2 = Windowed

Protected variable UProperty Config

int32

 

LastConfirmedFullscreenMode

Last user confirmed fullscreen mode setting.

Protected variable UProperty Config

float

 

LastRecommendedScreenHeight

Result of the last benchmark; calculated resolution to use.

Protected variable UProperty Config

float

 

LastRecommendedScreenWidth

Result of the last benchmark; calculated resolution to use.

Protected variable UProperty Config

uint32

 

LastUserConfirmedResolutionSizeX

Game screen resolution width, in pixels.

Protected variable UProperty Config

uint32

 

LastUserConfirmedResolutionSizeY

Game screen resolution height, in pixels.

Protected variable

float

 

MinResolutionScale

Min resolution scale we allow in current display mode

Protected variable UProperty Config

int32

 

PreferredFullscreenMode

Fullscreen mode to use when toggling between windowed and fullscreen.

Protected variable UProperty Config

uint32

 

ResolutionSizeX

Game screen resolution width, in pixels.

Protected variable UProperty Config

uint32

 

ResolutionSizeY

Game screen resolution height, in pixels.

Public variable

Scalability::FQ ...

 

ScalabilityQuality

Cached for the UI, current state if stored in console variables

Protected variable UProperty Config

uint32

 

Version

All settings will be wiped and set to default if the serialized version differs from UE_GAMEUSERSETTINGS_VERSION.

Protected variable UProperty Config

int32

 

WindowPosX

Window PosX

Protected variable UProperty Config

int32

 

WindowPosY

Window PosY

Functions

Name Description

Public function Virtual UFunction BlueprintCallable, Category

void

 

ApplyNonResolutionSettings()

Public function UFunction BlueprintCallable, Category

void

 

ApplyResolutionSettings

(
    bool bCheckForCommandLineOverrides
)

Public function Virtual UFunction BlueprintCallable, Category, Meta

void

 

ApplySettings

(
    bool bCheckForCommandLineOverrides
)

Applies all current user settings to the game and saves to permanent storage (e.g. file), optionally checking for command line overrides.

Public function UFunction BlueprintCallable, Category

void

 

ConfirmVideoMode()

Mark current video mode settings (fullscreenmode/resolution) as being confirmed by the user

Protected function

float

 

FindResolutionQualityForScreenSize

(
    float Width,
    float Height
)

Picks the best resolution quality for a given screen size

Public function UFunction BlueprintCallable, Category

int32

 

GetAntiAliasingQuality()

Returns the anti-aliasing quality (0..3, higher is better)

Public function UFunction BlueprintPure, Category

int32

 

GetAudioQualityLevel()

Returns the user's audio quality level setting

Public function Static UFunction BlueprintCallable, Category

FIntPoint

 

GetDefaultResolution()

The default resolution when no resolution is set

Public function Virtual UFunction BlueprintCallable, Category

float

 

GetDefaultResolutionScale()

Gets the desired resolution quality based on DesiredScreenHeight and the current screen resolution

Public function Static UFunction BlueprintCallable, Category

EWindowMode: ...

 

GetDefaultWindowMode()

The default window mode when no mode is set

Public function Static UFunction BlueprintCallable, Category

FIntPoint

 

GetDefaultWindowPosition()

The default window position when no position is set

Public function UFunction BlueprintPure, Category

FIntPoint

 

GetDesktopResolution()

Returns user's desktop resolution, in pixels.

Protected function Virtual

float

 

GetEffectiveFrameRateLimit()

Returns the effective frame rate limit (by default it returns the FrameRateLimit member)

Public function UFunction BlueprintCallable, Category

int32

 

GetFoliageQuality()

Returns the post-processing quality (0..3, higher is better)

Public function UFunction BlueprintPure, Category

float

 

GetFrameRateLimit()

Gets the user's frame rate limit (0 indiciates the frame rate limit is disabled)

Public function UFunction BlueprintPure, Category

EWindowMode: ...

 

GetFullscreenMode()

Returns the user setting for game window fullscreen mode.

Public function Static UFunction BlueprintCallable, Category

UGameUserSet ...

 

GetGameUserSettings()

Returns the game local machine settings (resolution, windowing mode, scalability settings, etc...)

Public function UFunction BlueprintPure, Category

EWindowMode: ...

 

GetLastConfirmedFullscreenMode()

Returns the last confirmed user setting for game window fullscreen mode.

Public function UFunction BlueprintPure, Category

FIntPoint

 

GetLastConfirmedScreenResolution()

Returns the last confirmed user setting for game screen resolution, in pixels.

Public function UFunction BlueprintCallable, Category

int32

 

GetOverallScalabilityLevel()

Returns the overall scalability level (can return -1 if the settings are custom)

Public function UFunction BlueprintCallable, Category

int32

 

GetPostProcessingQuality()

Returns the post-processing quality (0..3, higher is better)

Public function UFunction BlueprintCallable, Category, Meta

void

 

GetResolutionScaleInformation

(
    float& CurrentScaleNormalized,
    int32& CurrentScaleValue,
    int32& MinScaleValue,
    int32& MaxScaleValue
)

Returns the current resolution scale and the range.

Public function UFunction BlueprintCallable, Category, Meta

void

 

GetResolutionScaleInformationEx

(
    float& CurrentScaleNormalized,
    float& CurrentScaleValue,
    float& MinScaleValue,
    float& MaxScaleValue
)

Returns the current resolution scale and the range.

Public function UFunction BlueprintPure, Category

FIntPoint

 

GetScreenResolution()

Returns the user setting for game screen resolution, in pixels.

Public function UFunction BlueprintCallable, Category

int32

 

GetShadowQuality()

Returns the shadow quality (0..3, higher is better)

Public function UFunction BlueprintCallable, Category

int32

 

GetTextureQuality()

Returns the texture quality (0..3, higher is better)

Public function UFunction BlueprintCallable, Category

int32

 

GetViewDistanceQuality()

Returns the view distance quality (0..3, higher is better)

Public function UFunction BlueprintCallable, Category

int32

 

GetVisualEffectQuality()

Returns the visual effects quality (0..3, higher is better)

Public function Virtual

FIntPoint

 

GetWindowPosition()

Public function Virtual UFunction BlueprintPure, Category

bool

 

IsDirty()

Checks if any user settings is different from current

Public function UFunction BlueprintPure, Category

bool

 

IsFullscreenModeDirty()

Checks if the FullscreenMode user setting is different from current

Public function UFunction BlueprintPure, Category

bool

 

IsScreenResolutionDirty()

Checks if the Screen Resolution user setting is different from current

Protected function Virtual

bool

 

IsVersionValid()

Check if the current version of the game user settings is valid.

Public function UFunction BlueprintPure, Category

bool

 

IsVSyncDirty()

Checks if the vsync user setting is different from current system setting

Public function UFunction BlueprintPure, Category

bool

 

IsVSyncEnabled()

Returns the user setting for vsync.

Public function Static

void

 

LoadConfigIni

(
    bool bForceReload
)

Loads the user .ini settings into GConfig

Public function Virtual UFunction BlueprintCallable, Category

void

 

LoadSettings

(
    bool bForceReload
)

Loads the user settings from persistent storage

Public function Static

void

 

PreloadResolutionSettings()

Loads the resolution settings before is object is available

Public function Static

void

 

RequestResolutionChange

(
    int32 InResolutionX,
    int32 InResolutionY,
    EWindowMode::Type InWindowMode,
    bool bInDoOverrides
)

Request a change to the specified resolution and window mode. Optionally apply cmd line overrides.

Public function Virtual UFunction BlueprintCallable, Category

void

 

ResetToCurrentSettings()

This function resets all settings to the current system settings

Public function UFunction BlueprintCallable, Category

void

 

RevertVideoMode()

Revert video mode (fullscreenmode/resolution) back to the last user confirmed values

Public function Virtual UFunction BlueprintCallable, Category

void

 

SaveSettings()

Save the user settings to persistent storage (automatically happens as part of ApplySettings)

Public function UFunction BlueprintCallable, Category

void

 

SetAntiAliasingQuality

(
    int32 Value
)

Sets the anti-aliasing quality (0..3, higher is better)

Public function UFunction BlueprintCallable, Category

void

 

SetAudioQualityLevel

(
    int32 QualityLevel
)

Sets the user's audio quality level setting

Public function UFunction BlueprintCallable, Category

void

 

SetBenchmarkFallbackValues()

Set scalability settings to sensible fallback values, for use when the benchmark fails or potentially causes a crash

Public function UFunction BlueprintCallable, Category

void

 

SetFoliageQuality

(
    int32 Value
)

Sets the post-processing quality (0..3, higher is better)

Public function UFunction BlueprintCallable, Category

void

 

SetFrameRateLimit

(
    float NewLimit
)

Sets the user's frame rate limit (0 will disable frame rate limiting)

Protected function Static

void

 

SetFrameRateLimitCVar

(
    float InLimit
)

Sets the frame rate limit CVar to the passed in value, 0.0 indicates no limit

Public function UFunction BlueprintCallable, Category

void

 

SetFullscreenMode

(
    EWindowMode::Type InFullscreenMode
)

Sets the user setting for the game window fullscreen mode.

Public function UFunction BlueprintCallable, Category

void

 

SetOverallScalabilityLevel

(
    int32 Value
)

Changes all scalability settings at once based on a single overall quality level

Public function UFunction BlueprintCallable, Category

void

 

SetPostProcessingQuality

(
    int32 Value
)

Sets the post-processing quality (0..3, higher is better)

Public function UFunction BlueprintCallable, Category

void

 

SetResolutionScaleNormalized

(
    float NewScaleNormalized
)

Sets the current resolution scale as a normalized 0..1 value between MinScaleValue and MaxScaleValue.

Public function UFunction BlueprintCallable, Category, Meta

void

 

SetResolutionScaleValue

(
    int32 NewScaleValue
)

Sets the current resolution scale.

Public function UFunction BlueprintCallable, Category, Meta

void

 

SetResolutionScaleValueEx

(
    float NewScaleValue
)

Sets the current resolution scale.

Public function UFunction BlueprintCallable, Category

void

 

SetScreenResolution

(
    FIntPoint Resolution
)

Sets the user setting for game screen resolution, in pixels.

Public function UFunction BlueprintCallable, Category

void

 

SetShadowQuality

(
    int32 Value
)

Sets the shadow quality (0..3, higher is better)

Public function UFunction BlueprintCallable, Category

void

 

SetTextureQuality

(
    int32 Value
)

Sets the texture quality (0..3, higher is better)

Public function Virtual UFunction BlueprintCallable, Category

void

 

SetToDefaults()

Public function UFunction BlueprintCallable, Category

void

 

SetViewDistanceQuality

(
    int32 Value
)

Sets the view distance quality (0..3, higher is better)

Public function UFunction BlueprintCallable, Category

void

 

SetVisualEffectQuality

(
    int32 Value
)

Sets the visual effects quality (0..3, higher is better)

Public function UFunction BlueprintCallable, Category

void

 

SetVSyncEnabled

(
    bool bEnable
)

Sets the user setting for vsync.

Public function Virtual

void

 

SetWindowPosition

(
    int32 WindowPosX,
    int32 WindowPosY
)

Protected function Virtual

void

 

UpdateVersion()

Update the version of the game user settings to the current version

Public function Virtual UFunction BlueprintCallable, Category

void

 

ValidateSettings()

Validates and resets bad user settings to default. Deletes stale user settings file if necessary.

References

Module

Engine

Header

Runtime/Engine/Classes/GameFramework/GameUserSettings.h