UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FConfigContext Class Reference

#include <ConfigContext.h>

Classes

struct  FPerPlatformDirs
 

Public Member Functions

void CORE_API VisualizeHierarchy (FOutputDevice &Ar, const TCHAR *IniName)
 
CORE_API bool Load (const TCHAR *IniName)
 
CORE_API bool Load (const TCHAR *IniName, FString &OutFilename)
 
CORE_API const FPerPlatformDirsGetPerPlatformDirs (const FString &PlatformName)
 
CORE_API ~FConfigContext ()
 

Static Public Member Functions

static FConfigContext ReadIntoLocalFile (FConfigFile &DestConfigFile, const FString &Platform=FString())
 
static FConfigContext ReadSingleIntoLocalFile (FConfigFile &DestConfigFile, const FString &Platform=FString())
 
static FConfigContext ReadIntoGConfig ()
 
static FConfigContext ForceReloadIntoGConfig ()
 
static FConfigContext ReadSingleIntoGConfig ()
 
static FConfigContext ReadIntoConfigSystem (FConfigCacheIni *ConfigSystem, const FString &Platform)
 
static FConfigContext ReadSingleIntoConfigSystem (FConfigCacheIni *ConfigSystem, const FString &Platform)
 
static FConfigContext ReadIntoPluginFile (FConfigFile &DestConfigFile, const FString &PluginRootDir, const TArray< FString > &ChildPluginsBaseDirs, const FString &Platform=FString())
 
static FConfigContext ReadPluginIntoConfigSystem (FConfigCacheIni *ConfigSystem, FName PluginName, const FString &PluginRootDir, const TArray< FString > &ChildPluginsBaseDirs)
 
static FConfigContext ReadPluginToModifyConfigSystem (FConfigCacheIni *ConfigSystem, DynamicLayerPriority Priority, FName PluginName, const FString &PluginRootDir, const TArray< FString > &ChildPluginsBaseDirs, FConfigModificationTracker *ChangeTracker=nullptr)
 
static FConfigContext ReadUpToBeforeFile (FConfigFile &DestConfigFile, const FString &Platform, const FString &StartSkippingAtFilename)
 
static FConfigContext FixupBranchAfterBinaryConfig ()
 
static CORE_API void EnsureRequiredGlobalPathsHaveBeenInitialized ()
 
static CORE_API void VisualizeHierarchy (FOutputDevice &Ar, const TCHAR *IniName, const TCHAR *OverridePlatform, const TCHAR *OverrideProjectOrProgramDataDir, const TCHAR *OverridePluginDir=nullptr, const TArray< FString > *ChildPluginBaseDirs=nullptr)
 

Public Attributes

FConfigCacheIniConfigSystem
 
FConfigFileExistingFile = nullptr
 
FConfigBranchBranch = nullptr
 
FConfigBranchTemporaryBranch = nullptr
 
FString DestIniFilename
 
FString Platform
 
FString SavePlatform
 
FString GeneratedConfigDir
 
FString BaseIniName
 
FString StartSkippingAtFilename
 
FString EngineConfigDir
 
FString EngineRootDir
 
FString ProjectConfigDir
 
FString ProjectRootDir
 
FString PluginRootDir
 
TArray< FString > ChildPluginBaseDirs
 
FConfigModificationTrackerChangeTracker = nullptr
 
FName ConfigFileTag
 
FString ProjectLimitedAccessDir
 
FString ProjectNotForLicenseesDir
 
FString ProjectNoRedistDir
 
TMap< FString, FPerPlatformDirsPerPlatformDirs
 
TArray< FConfigLayerOverrideLayers
 
bool bUseHierarchyCache = false
 
bool bAllowGeneratedIniWhenCooked = false
 
bool bForceReload = false
 
bool bAllowRemoteConfig = false
 
bool bIsHierarchicalConfig
 
bool bWriteDestIni = false
 
bool bDefaultEngineRequired = false
 
bool bIsForPlugin = false
 
bool bIsForPluginModification = false
 
bool bIncludeTagNameInBranchName = false
 
bool bIsMakingBinaryConfig = false
 
bool bIsFixingUpAfterBinaryConfig = false
 
DynamicLayerPriority PluginModificationPriority
 
const TSet< FString > * IniCacheSet = nullptr
 
const TSet< FString > * StagedGlobalConfigCache = nullptr
 
const TSet< FString > * StagedPluginConfigCache = nullptr
 
TFunction< void(const TArray< FDynamicLayerInfo > &)> HandleLayersFunction = nullptr
 

Protected Member Functions

CORE_API FConfigContext (FConfigCacheIni *InConfigSystem, bool InIsHierarchicalConfig, const FString &InPlatform, FConfigFile *DestConfigFile=nullptr)
 

Protected Attributes

bool bDoNotResetConfigFile = false
 
bool bCacheOnNextLoad = true
 

Constructor & Destructor Documentation

◆ ~FConfigContext()

FConfigContext::~FConfigContext ( )

◆ FConfigContext()

FConfigContext::FConfigContext ( FConfigCacheIni InConfigSystem,
bool  InIsHierarchicalConfig,
const FString &  InPlatform,
FConfigFile DestConfigFile = nullptr 
)
protected

Member Function Documentation

◆ EnsureRequiredGlobalPathsHaveBeenInitialized()

void FConfigContext::EnsureRequiredGlobalPathsHaveBeenInitialized ( )
static

Call to make before attempting parallel config init

◆ FixupBranchAfterBinaryConfig()

static FConfigContext FConfigContext::FixupBranchAfterBinaryConfig ( )
inlinestatic

Create a context to read only the saved/generated file (eg. <Project>/Saved/Windows/Input.ini) and commandline options after loading a binary config, that was of course made without saved files and commandline options

◆ ForceReloadIntoGConfig()

static FConfigContext FConfigContext::ForceReloadIntoGConfig ( )
inlinestatic

Create a context to read a hierarchical config into GConfig. Only for current platform.

◆ GetPerPlatformDirs()

const FConfigContext::FPerPlatformDirs & FConfigContext::GetPerPlatformDirs ( const FString &  PlatformName)

Return the paths to use to find hierarchical config files for the given platform (note that these are independent of the ini name)

◆ Load() [1/2]

bool FConfigContext::Load ( const TCHAR IniName)

Use the context to perform the actual load operation. Note that this is where you specify the Ini name (for instance "Engine"), meaning you can use the same context for multiple configs (Engine, Game, Input, etc)

◆ Load() [2/2]

bool FConfigContext::Load ( const TCHAR IniName,
FString &  OutFilename 
)

Use the context to perform the actual load operation as above, but will return the generated final ini filename (in the case of GConfig, this would be the key used to look up into GConfig, for example)

◆ ReadIntoConfigSystem()

static FConfigContext FConfigContext::ReadIntoConfigSystem ( FConfigCacheIni ConfigSystem,
const FString &  Platform 
)
inlinestatic

Create a context to read a hierarchical config into the given ConfigSystem structure - usually will be for other platforms

◆ ReadIntoGConfig()

static FConfigContext FConfigContext::ReadIntoGConfig ( )
inlinestatic

Create a context to read a hierarchical config into GConfig. Only for current platform.

◆ ReadIntoLocalFile()

static FConfigContext FConfigContext::ReadIntoLocalFile ( FConfigFile DestConfigFile,
const FString &  Platform = FString() 
)
inlinestatic

Create a context to read a hierarchical config into the given local FConfigFile, optionally for another platform

◆ ReadIntoPluginFile()

static FConfigContext FConfigContext::ReadIntoPluginFile ( FConfigFile DestConfigFile,
const FString &  PluginRootDir,
const TArray< FString > &  ChildPluginsBaseDirs,
const FString &  Platform = FString() 
)
inlinestatic

Create a context to read a plugin's ini file named for the plugin. This is not used for inserting, say, Engine.ini into GConfig

◆ ReadPluginIntoConfigSystem()

static FConfigContext FConfigContext::ReadPluginIntoConfigSystem ( FConfigCacheIni ConfigSystem,
FName  PluginName,
const FString &  PluginRootDir,
const TArray< FString > &  ChildPluginsBaseDirs 
)
inlinestatic

Inserts plugin ini files into an existing Branch

◆ ReadPluginToModifyConfigSystem()

static FConfigContext FConfigContext::ReadPluginToModifyConfigSystem ( FConfigCacheIni ConfigSystem,
DynamicLayerPriority  Priority,
FName  PluginName,
const FString &  PluginRootDir,
const TArray< FString > &  ChildPluginsBaseDirs,
FConfigModificationTracker ChangeTracker = nullptr 
)
inlinestatic

Inserts plugin ini files into an existing Branch

◆ ReadSingleIntoConfigSystem()

static FConfigContext FConfigContext::ReadSingleIntoConfigSystem ( FConfigCacheIni ConfigSystem,
const FString &  Platform 
)
inlinestatic

Create a context to read a non-hierarchical config into the given ConfigSystem structure - usually will be for other platforms

◆ ReadSingleIntoGConfig()

static FConfigContext FConfigContext::ReadSingleIntoGConfig ( )
inlinestatic

Create a context to read a non-hierarchical config into GConfig. Only for current platform.

◆ ReadSingleIntoLocalFile()

static FConfigContext FConfigContext::ReadSingleIntoLocalFile ( FConfigFile DestConfigFile,
const FString &  Platform = FString() 
)
inlinestatic

Create a context to read a non-hierarchical config into the given local FConfigFile, optionally for another platform

◆ ReadUpToBeforeFile()

static FConfigContext FConfigContext::ReadUpToBeforeFile ( FConfigFile DestConfigFile,
const FString &  Platform,
const FString &  StartSkippingAtFilename 
)
inlinestatic

Create a context to read a hierarchy, but once it reaches the given filename (StartDeletingFilename), it will not read in anymore files at that point

◆ VisualizeHierarchy() [1/2]

void FConfigContext::VisualizeHierarchy ( FOutputDevice Ar,
const TCHAR IniName 
)

Visualize an existing hierarchy

◆ VisualizeHierarchy() [2/2]

void FConfigContext::VisualizeHierarchy ( FOutputDevice Ar,
const TCHAR IniName,
const TCHAR OverridePlatform,
const TCHAR OverrideProjectOrProgramDataDir,
const TCHAR OverridePluginDir = nullptr,
const TArray< FString > *  ChildPluginBaseDirs = nullptr 
)
static

Log out the config full hierarchy of a file, with various overrides to see other projects/platforms/etc hierarchies

Member Data Documentation

◆ bAllowGeneratedIniWhenCooked

bool FConfigContext::bAllowGeneratedIniWhenCooked = false

◆ bAllowRemoteConfig

bool FConfigContext::bAllowRemoteConfig = false

◆ BaseIniName

FString FConfigContext::BaseIniName

◆ bCacheOnNextLoad

bool FConfigContext::bCacheOnNextLoad = true
protected

◆ bDefaultEngineRequired

bool FConfigContext::bDefaultEngineRequired = false

◆ bDoNotResetConfigFile

bool FConfigContext::bDoNotResetConfigFile = false
protected

◆ bForceReload

bool FConfigContext::bForceReload = false

◆ bIncludeTagNameInBranchName

bool FConfigContext::bIncludeTagNameInBranchName = false

◆ bIsFixingUpAfterBinaryConfig

bool FConfigContext::bIsFixingUpAfterBinaryConfig = false

◆ bIsForPlugin

bool FConfigContext::bIsForPlugin = false

◆ bIsForPluginModification

bool FConfigContext::bIsForPluginModification = false

◆ bIsHierarchicalConfig

bool FConfigContext::bIsHierarchicalConfig

◆ bIsMakingBinaryConfig

bool FConfigContext::bIsMakingBinaryConfig = false

◆ Branch

FConfigBranch* FConfigContext::Branch = nullptr

◆ bUseHierarchyCache

bool FConfigContext::bUseHierarchyCache = false

◆ bWriteDestIni

bool FConfigContext::bWriteDestIni = false

◆ ChangeTracker

FConfigModificationTracker* FConfigContext::ChangeTracker = nullptr

◆ ChildPluginBaseDirs

TArray<FString> FConfigContext::ChildPluginBaseDirs

◆ ConfigFileTag

FName FConfigContext::ConfigFileTag

◆ ConfigSystem

FConfigCacheIni* FConfigContext::ConfigSystem

◆ DestIniFilename

FString FConfigContext::DestIniFilename

◆ EngineConfigDir

FString FConfigContext::EngineConfigDir

◆ EngineRootDir

FString FConfigContext::EngineRootDir

◆ ExistingFile

FConfigFile* FConfigContext::ExistingFile = nullptr

◆ GeneratedConfigDir

FString FConfigContext::GeneratedConfigDir

◆ HandleLayersFunction

TFunction<void(const TArray<FDynamicLayerInfo>&)> FConfigContext::HandleLayersFunction = nullptr

◆ IniCacheSet

const TSet<FString>* FConfigContext::IniCacheSet = nullptr

◆ OverrideLayers

TArray<FConfigLayer> FConfigContext::OverrideLayers

◆ PerPlatformDirs

TMap<FString, FPerPlatformDirs> FConfigContext::PerPlatformDirs

◆ Platform

FString FConfigContext::Platform

◆ PluginModificationPriority

DynamicLayerPriority FConfigContext::PluginModificationPriority

◆ PluginRootDir

FString FConfigContext::PluginRootDir

◆ ProjectConfigDir

FString FConfigContext::ProjectConfigDir

◆ ProjectLimitedAccessDir

FString FConfigContext::ProjectLimitedAccessDir

◆ ProjectNoRedistDir

FString FConfigContext::ProjectNoRedistDir

◆ ProjectNotForLicenseesDir

FString FConfigContext::ProjectNotForLicenseesDir

◆ ProjectRootDir

FString FConfigContext::ProjectRootDir

◆ SavePlatform

FString FConfigContext::SavePlatform

◆ StagedGlobalConfigCache

const TSet<FString>* FConfigContext::StagedGlobalConfigCache = nullptr

◆ StagedPluginConfigCache

const TSet<FString>* FConfigContext::StagedPluginConfigCache = nullptr

◆ StartSkippingAtFilename

FString FConfigContext::StartSkippingAtFilename

◆ TemporaryBranch

FConfigBranch* FConfigContext::TemporaryBranch = nullptr

The documentation for this class was generated from the following files: