UDeviceProfileManager

Implements a helper class that manages all profiles in the Device

Inheritance Hierarchy

UObjectBase

UObjectBaseUtility

UObject

UDeviceProfileManager

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/DeviceProfiles/DeviceProfileManager.h

Include

#include "DeviceProfiles/DeviceProfileManager.h"

Syntax

class UDeviceProfileManager : public UObject

Remarks

Implements a helper class that manages all profiles in the Device

Variables

Name Description

Public variable

TArray< TObject...

 

Profiles

Holds the collection of managed profiles.

Functions

Name Description

Public function

void

 

ChangeTaggedFragmentState

(
    FName FragmentTag,
    bool bNewState
)

Enable/Disable a tagged fragment of the active device profile.

Public function

UDeviceProfi...

 

CreateProfile

(
    const FString& ProfileName,
    const FString& ProfileType,
    const FString& ParentName,
    const TCHAR* ConfigPlatform
)

Create a copy of a device profile from a copy.

Public function

void

 

DeleteProfile

(
    UDeviceProfile* Profile
)

Delete a profile.

Public function

bool

 

DoActiveProfilesReference

(
    const TSet< FString >& DeviceProfi...
)

Examine the currently active or overridden profile for references to entries in DeviceProfilesToQuery

Public function

UDeviceProfi...

 

FindProfile

(
    const FString& ProfileName,
    bool bCreateProfileOnFail
)

Find a profile based on the name.

Public function Static

TMap< FName,...

 

GatherDeviceProfileCVars

(
    const FString& DeviceProfileName,
    EDeviceProfileMode GatherMode
)

Walk the device profile/fragment chain to get the final set ot CVars in a unified way

Public function Static

UDeviceProfi...

 

Get

(
    bool bFromPostCDOContruct
)

Public function Const

const FSelec...

 

GetActiveDeviceProfileFragmentByTag

(
    FName& FragmentTag
)

Return the selected fragment property from the currently active device profile.

Public function

const FStrin...

 

GetActiveDeviceProfileMatchedFragmentsString

(
    bool bEnabledOnly,
    bool bIncludeTags,
    bool bAlphaSort
)

Get a string containing the current matched fragment list.

Public function

const FStrin...

 

GetActiveDeviceProfileName()

Get the current active profile name.

Public function Const

UDeviceProfi...

 

GetActiveProfile()

Get the selected device profile

Public function Const

void

 

GetAllPossibleParentProfiles

(
    const UDeviceProfile* ChildPro...,
    TArray< UDeviceProfile* >& Po...
)

Get a list of all possible parent profiles for a given device profile

Public function Static

TMap< FName,...

 

GetAllReferencedDeviceProfileCVars

(
    UDeviceProfile* DeviceProfile
)

Gather all the cvars from the static device profile and then add all of the possible cvars+values from the dynamic/matched rule fragments.

Public function Static

const FStrin...

 

GetPlatformDeviceProfileName()

Get the selected device profile name, either the platform name, or the name provided by a Device Profile Selector Module.

Public function Const

UDeviceProfi...

 

GetPreviewDeviceProfile()

Get the currently previewing device profile. Can be null.

Public function

void

 

GetProfileConfigFiles

(
    TArray< FString >& OutConfigFiles
)

Returns the config files for all loaded device profiles, this will include platform-specific ones

Public function Static

bool

 

GetScalabilityCVar

(
    const FString& CvarName,
    int32& OutValue
)

Retrieves the value of a scalability group cvar if it was set by the active device profile.

Public function Static

bool

 

GetScalabilityCVar

(
    const FString& CvarName,
    float& OutValue
)

Retrieves the value of a scalability group cvar if it was set by the active device profile.

Public function

bool

 

HasLoadableProfileName

(
    const FString& ProfileName,
    FName OptionalPlatformName
)

Tests to see if a named device profile is available to call CreateProfile with.

Public function Static

void

 

InitializeCVarsForActiveDeviceProfile

(
    bool bPushSettings,
    bool bIsDeviceProfilePreview,
    bool bForceReload
)

Startup and select the active device profile Then Init the CVars from this profile and it's Device profile parent tree.

Public function

void

 

LoadProfiles()

Load the device profiles from the config file.

Public function

FOnActiveDev...

 

OnActiveDeviceProfileChanged()

Returns a delegate that is invoked when the active device profile changes

Public function

FOnDevicePro...

 

OnManagerUpdated()

Returns a delegate that is invoked when manager is updated.

Public function

void

 

ReapplyDeviceProfile

(
    bool bForceReload
)

Reapplies the device profile.

Public function

void

 

RestoreDefaultDeviceProfile()

Restore the device profile to the default for this device

Public function

void

 

SaveProfiles

(
    bool bSaveToDefaults
)

Save the device profiles.

Public function

void

 

SetOverrideDeviceProfile

(
    UDeviceProfile* DeviceProfile
)

Overrides the device profile. The original profile can be restored with RestoreDefaultDeviceProfile

Overridden from UObject

Name Description

Public function Virtual

void

 

PostCDOContruct()

Called after the C++ constructor has run on the Class Default Object (CDO) for a class.

Enums

Name

Description

Public enum

EDeviceProfileMode

Constants

Name

Description

BackupSuffix

Add to profile to get load time backup.

DeviceProfileManagerSingleton

DeviceProfileScalabilityCVars

Stores any scalability group settings set by the active device profile.

PlatformFragmentsSelected

The list of fragments that have been selected by the active profile.

PushedSettings

Original values of all the CVars modified by the DP. Used to undo the DP before applying new state.

Deprecated Functions

Name Description

Public function Static

const FStrin...

 

GetActiveProfileName()

Use either GetActiveDeviceProfileName to have the current active device profile or GetPlatformDeviceProfileName to have the default one. Note, GetActiveDeviceProfileName will fallback on GetPlatformDeviceProfileName, if there is no active device profile

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Cancel