Navigation
Unreal Engine C++ API Reference > Runtime > Engine > GameFramework
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UGameUserSettings
References
Module | Engine |
Header | /Engine/Source/Runtime/Engine/Classes/GameFramework/GameUserSettings.h |
Include | #include "GameFramework/GameUserSettings.h" |
Syntax
UCLASS (Config=GameUserSettings, ConfigDoNotCheckDefaults, MinimalAPI)
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
Type | Name | Description | |
---|---|---|---|
![]() ![]() ![]() |
int32 | AudioQualityLevel | |
![]() ![]() ![]() |
bool | bUseDesiredScreenHeight | If true, the desired screen height will be used to scale the render resolution automatically. |
![]() ![]() ![]() |
bool | bUseDynamicResolution | Whether to use dynamic resolution or not. (public to allow UI to connect to it) |
![]() ![]() ![]() |
bool | bUseHDRDisplayOutput | HDR |
![]() ![]() ![]() |
bool | bUseVSync | Whether to use VSync or not. (public to allow UI to connect to it) |
![]() ![]() ![]() |
int32 | DesiredScreenHeight | Desired screen height used to calculate the resolution scale when user changes display mode |
![]() ![]() ![]() |
int32 | DesiredScreenWidth | Desired screen width used to calculate the resolution scale when user changes display mode |
![]() ![]() ![]() |
float | FrameRateLimit | Frame rate cap |
![]() ![]() ![]() |
int32 | FullscreenMode | Game window fullscreen mode 0 = Fullscreen 1 = Windowed fullscreen 2 = Windowed |
![]() ![]() ![]() |
int32 | HDRDisplayOutputNits | HDR |
![]() ![]() ![]() |
int32 | LastConfirmedAudioQualityLevel | |
![]() ![]() ![]() |
int32 | LastConfirmedFullscreenMode | Last user confirmed fullscreen mode setting. |
![]() ![]() ![]() |
float | LastCPUBenchmarkResult | Result of the last benchmark (CPU); -1 if there has not been a benchmark run |
![]() ![]() ![]() |
TArray< float > | LastCPUBenchmarkSteps | Result of each individual sub-section of the last CPU benchmark; empty if there has not been a benchmark run |
![]() ![]() ![]() |
float | LastGPUBenchmarkMultiplier | Multiplier used against the last GPU benchmark |
![]() ![]() ![]() |
float | LastGPUBenchmarkResult | Result of the last benchmark (GPU); -1 if there has not been a benchmark run |
![]() ![]() ![]() |
TArray< float > | LastGPUBenchmarkSteps | Result of each individual sub-section of the last GPU benchmark; empty if there has not been a benchmark run |
![]() ![]() ![]() |
float | LastRecommendedScreenHeight | Result of the last benchmark; calculated resolution to use. |
![]() ![]() ![]() |
float | LastRecommendedScreenWidth | Result of the last benchmark; calculated resolution to use. |
![]() ![]() ![]() |
int32 | LastUserConfirmedDesiredScreenHeight | Desired screen height used to calculate the resolution scale when user changes display mode |
![]() ![]() ![]() |
int32 | LastUserConfirmedDesiredScreenWidth | Desired screen width used to calculate the resolution scale when user changes display mode |
![]() ![]() ![]() |
uint32 | LastUserConfirmedResolutionSizeX | Game screen resolution width, in pixels. |
![]() ![]() ![]() |
uint32 | LastUserConfirmedResolutionSizeY | Game screen resolution height, in pixels. |
![]() |
float | MinResolutionScale | Min resolution scale we allow in current display mode |
![]() |
FUpdateCloudDataFromGameUserSettings | OnUpdateCloudDataFromGameUserSettings | |
![]() |
FUpdateGameUserSettingsFileFromCloud | OnUpdateGameUserSettingsFileFromCloud | |
![]() ![]() ![]() |
int32 | PreferredFullscreenMode | Fullscreen mode to use when toggling between windowed and fullscreen. |
![]() ![]() ![]() |
uint32 | ResolutionSizeX | Game screen resolution width, in pixels. |
![]() ![]() ![]() |
uint32 | ResolutionSizeY | Game screen resolution height, in pixels. |
![]() |
Scalability::FQualityLevels | ScalabilityQuality | Cached for the UI, current state if stored in console variables |
![]() ![]() ![]() |
uint32 | Version | All settings will be wiped and set to default if the serialized version differs from UE_GAMEUSERSETTINGS_VERSION. |
![]() ![]() ![]() |
int32 | WindowPosX | Window PosX |
![]() ![]() ![]() |
int32 | WindowPosY | Window PosY |
Constructors
Type | Name | Description | |
---|---|---|---|
![]() |
UGameUserSettings
(
const FObjectInitializer& ObjectInitializer |
Functions
Type | Name | Description | |
---|---|---|---|
![]() ![]() ![]() ![]() |
void | Applies the settings stored in ScalabilityQuality and saves settings | |
![]() ![]() ![]() ![]() |
void | ||
![]() ![]() ![]() |
void | ApplyResolutionSettings
(
bool bCheckForCommandLineOverrides |
|
![]() ![]() ![]() ![]() |
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. |
![]() ![]() ![]() ![]() |
void | Mark current video mode settings (fullscreenmode/resolution) as being confirmed by the user | |
![]() ![]() ![]() |
void | EnableHDRDisplayOutput
(
bool bEnable, |
Enables or disables HDR display output. Can be called again to change the desired nit level |
![]() |
void | EnableHDRDisplayOutputInternal
(
bool bEnable, |
|
![]() |
float | FindResolutionQualityForScreenSize
(
float Width, |
Picks the best resolution quality for a given screen size |
![]() ![]() ![]() ![]() |
int32 | Returns the anti-aliasing quality (0..4, higher is better) | |
![]() ![]() ![]() ![]() |
int32 | Returns the user's audio quality level setting | |
![]() ![]() |
FString | GetConfigDir () |
|
![]() ![]() ![]() ![]() |
int32 | Returns 0 if HDR isn't supported or is turned off | |
![]() ![]() ![]() ![]() |
FIntPoint | Returns the default resolution when no resolution is set | |
![]() ![]() ![]() ![]() |
float | Gets the desired resolution quality based on DesiredScreenWidth/Height and the current screen resolution | |
![]() ![]() ![]() ![]() |
EWindowMode::Type | Returns the default window mode when no mode is set | |
![]() ![]() ![]() ![]() |
FIntPoint | Returns the default window position when no position is set | |
![]() ![]() ![]() ![]() |
FIntPoint | Returns user's desktop resolution, in pixels. | |
![]() ![]() |
float | Returns the effective frame rate limit (by default it returns the FrameRateLimit member) | |
![]() ![]() ![]() ![]() |
int32 | Returns the foliage quality (0..4, higher is better) | |
![]() ![]() ![]() ![]() |
int32 | GetFramePace () |
Gets the current frame pacing frame rate in fps, or 0 if none |
![]() ![]() ![]() ![]() |
float | Gets the user's frame rate limit (0 indiciates the frame rate limit is disabled) | |
![]() ![]() ![]() ![]() |
EWindowMode::Type | Returns the user setting for game window fullscreen mode. | |
![]() ![]() ![]() ![]() |
UGameUserSettings * | Returns the game local machine settings (resolution, windowing mode, scalability settings, etc...) | |
![]() ![]() ![]() ![]() |
int32 | Returns the global illumination quality (0..4, higher is better) | |
![]() ![]() ![]() ![]() |
EWindowMode::Type | Returns the last confirmed user setting for game window fullscreen mode. | |
![]() ![]() ![]() ![]() |
FIntPoint | Returns the last confirmed user setting for game screen resolution, in pixels. | |
![]() ![]() |
float | Returns the last CPU benchmark result (set by RunHardwareBenchmark) | |
![]() ![]() |
TArray< float > | Returns each individual step of the last CPU benchmark result (set by RunHardwareBenchmark) | |
![]() ![]() |
float | Returns the last GPU benchmark result (set by RunHardwareBenchmark) | |
![]() ![]() |
TArray< float > | Returns each individual step of the last GPU benchmark result (set by RunHardwareBenchmark) | |
![]() ![]() ![]() ![]() ![]() |
int32 | Returns the overall scalability level (can return -1 if the settings are custom) | |
![]() ![]() ![]() ![]() |
int32 | Returns the post-processing quality (0..4, higher is better) | |
![]() ![]() ![]() ![]() |
EWindowMode::Type | Returns the user setting for game window fullscreen mode. | |
![]() ![]() ![]() ![]() |
float | Gets the recommended resolution quality based on LastRecommendedScreenWidth/Height and the current screen resolution | |
![]() ![]() ![]() ![]() |
int32 | Returns the reflection quality (0..4, higher is better) | |
![]() ![]() ![]() ![]() |
void | GetResolutionScaleInformationEx
(
float& CurrentScaleNormalized, |
Returns the current resolution scale and the range. |
![]() ![]() ![]() ![]() |
float | Gets the current resolution scale as a normalized 0..1 value between MinScaleValue and MaxScaleValue. | |
![]() ![]() ![]() ![]() |
FIntPoint | Returns the user setting for game screen resolution, in pixels. | |
![]() ![]() ![]() ![]() |
int32 | Returns the shading quality (0..4, higher is better) | |
![]() ![]() ![]() ![]() |
int32 | Returns the shadow quality (0..4, higher is better) | |
![]() ![]() ![]() ![]() |
int32 | Gets the current vsync interval setting | |
![]() ![]() ![]() ![]() |
int32 | Returns the texture quality (0..4, higher is better) | |
![]() ![]() ![]() ![]() |
int32 | Returns the view distance quality (0..4, higher is better) | |
![]() ![]() ![]() ![]() |
int32 | Returns the visual effects quality (0..4, higher is better) | |
![]() ![]() |
FIntPoint | ||
![]() ![]() ![]() ![]() ![]() |
bool | IsDirty () |
Checks if any user settings is different from current |
![]() ![]() ![]() ![]() |
bool | Checks if the dynamic resolution user setting is different from current system setting | |
![]() ![]() ![]() ![]() ![]() |
bool | Returns the user setting for dynamic resolution. | |
![]() ![]() ![]() ![]() |
bool | Checks if the FullscreenMode user setting is different from current | |
![]() ![]() ![]() ![]() |
bool | IsHDREnabled () |
|
![]() ![]() ![]() ![]() |
bool | Checks if the Screen Resolution user setting is different from current | |
![]() ![]() |
bool | Check if the current version of the game user settings is valid. | |
![]() ![]() ![]() ![]() |
bool | IsVSyncDirty () |
Checks if the vsync user setting is different from current system setting |
![]() ![]() ![]() ![]() |
bool | Returns the user setting for vsync. | |
![]() ![]() |
void | LoadConfigIni
(
bool bForceReload |
Loads the user .ini settings into GConfig |
![]() ![]() ![]() ![]() |
void | LoadSettings
(
bool bForceReload |
Loads the user settings from persistent storage |
![]() ![]() |
void | PreloadResolutionSettings
(
bool bAllowCmdLineOverrides |
Loads the resolution settings before is object is available |
![]() ![]() |
void | RequestResolutionChange
(
int32 InResolutionX, |
Request a change to the specified resolution and window mode. Optionally apply cmd line overrides. |
![]() |
void | ||
![]() ![]() ![]() ![]() |
void | This function resets all settings to the current system settings | |
![]() ![]() ![]() |
void | Revert video mode (fullscreenmode/resolution) back to the last user confirmed values | |
![]() ![]() ![]() ![]() |
void | RunHardwareBenchmark
(
int32 WorkScale, |
Runs the hardware benchmark and populates ScalabilityQuality as well as the last benchmark results config members, but does not apply the settings it determines. |
![]() ![]() ![]() ![]() |
void | SaveSettings () |
Save the user settings to persistent storage (automatically happens as part of ApplySettings) |
![]() ![]() ![]() |
void | SetAntiAliasingQuality
(
int32 Value |
Sets the anti-aliasing quality (0..4, higher is better) |
![]() ![]() ![]() |
void | SetAudioQualityLevel
(
int32 QualityLevel |
Sets the user's audio quality level setting |
![]() ![]() ![]() |
void | Set scalability settings to sensible fallback values, for use when the benchmark fails or potentially causes a crash | |
![]() ![]() ![]() |
void | SetDynamicResolutionEnabled
(
bool bEnable |
Sets the user setting for dynamic resolution. |
![]() ![]() ![]() |
void | SetFoliageQuality
(
int32 Value |
Sets the foliage quality (0..4, higher is better) |
![]() ![]() ![]() |
void | SetFrameRateLimit
(
float NewLimit |
Sets the user's frame rate limit (0 will disable frame rate limiting) |
![]() ![]() |
void | SetFrameRateLimitCVar
(
float InLimit |
Sets the frame rate limit CVar to the passed in value, 0.0 indicates no limit |
![]() ![]() ![]() |
void | SetFullscreenMode
(
EWindowMode::Type InFullscreenMode |
Sets the user setting for the game window fullscreen mode. |
![]() ![]() ![]() |
void | SetGlobalIlluminationQuality
(
int32 Value |
Sets the global illumination quality (0..4, higher is better) |
![]() ![]() ![]() ![]() |
void | SetOverallScalabilityLevel
(
int32 Value |
Changes all scalability settings at once based on a single overall quality level |
![]() ![]() ![]() |
void | SetPostProcessingQuality
(
int32 Value |
Sets the post-processing quality (0..4, higher is better) |
![]() ![]() ![]() |
void | SetReflectionQuality
(
int32 Value |
Sets the reflection quality (0..4, higher is better) |
![]() ![]() ![]() |
void | SetResolutionScaleNormalized
(
float NewScaleNormalized |
Sets the current resolution scale as a normalized 0..1 value between MinScaleValue and MaxScaleValue. |
![]() ![]() ![]() |
void | SetResolutionScaleValueEx
(
float NewScaleValue |
Sets the current resolution scale. |
![]() ![]() ![]() |
void | SetScreenResolution
(
FIntPoint Resolution |
Sets the user setting for game screen resolution, in pixels. |
![]() ![]() ![]() |
void | SetShadingQuality
(
int32 Value |
Sets the shading quality (0..4, higher is better) |
![]() ![]() ![]() |
void | SetShadowQuality
(
int32 Value |
Sets the shadow quality (0..4, higher is better) |
![]() ![]() |
void | SetSyncTypeCVar
(
int32 InInterval |
Sets the input latency mode 0 and 2 |
![]() ![]() ![]() |
void | SetTextureQuality
(
int32 Value |
Sets the texture quality (0..4, higher is better) |
![]() ![]() ![]() ![]() |
void | ||
![]() ![]() ![]() |
void | SetViewDistanceQuality
(
int32 Value |
Sets the view distance quality (0..4, higher is better) |
![]() ![]() ![]() |
void | SetVisualEffectQuality
(
int32 Value |
Sets the visual effects quality (0..4, higher is better) |
![]() ![]() ![]() |
void | SetVSyncEnabled
(
bool bEnable |
Sets the user setting for vsync. |
![]() ![]() |
void | SetWindowPosition
(
int32 WindowPosX, |
|
![]() ![]() ![]() ![]() ![]() |
bool | Whether the curently running system supports HDR display output | |
![]() |
void | ||
![]() ![]() |
void | Update the version of the game user settings to the current version | |
![]() ![]() ![]() ![]() |
void | Validates and resets bad user settings to default. Deletes stale user settings file if necessary. |
Typedefs
Name | Description |
---|---|
FUpdateCloudDataFromGameUserSettings | We call this to notify any listening Cloud subsystem that we have updated the config file. |
FUpdateGameUserSettingsFileFromCloud | We call this to refresh the config file from a listening Cloud subsystem, before we open it. |