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

#include <ConfigCacheIni.h>

Classes

struct  FKnownConfigFiles
 

Public Member Functions

CORE_API FConfigCacheIni (EConfigCacheType Type, FName PlatformName=NAME_None, bool bInGloballyRegistered=false)
 
CORE_API FConfigCacheIni ()
 
virtual CORE_API ~FConfigCacheIni ()
 
CORE_API void DisableFileOperations ()
 
CORE_API void EnableFileOperations ()
 
CORE_API bool AreFileOperationsDisabled ()
 
bool IsReadyForUse ()
 
bool IsGloballyRegistered () const
 
CORE_API void Tick (float DeltaSeconds)
 
CORE_API void Parse1ToNSectionOfStrings (const TCHAR *Section, const TCHAR *KeyOne, const TCHAR *KeyN, TMap< FString, TArray< FString > > &OutMap, const FString &Filename)
 
CORE_API void Parse1ToNSectionOfNames (const TCHAR *Section, const TCHAR *KeyOne, const TCHAR *KeyN, TMap< FName, TArray< FName > > &OutMap, const FString &Filename)
 
CORE_API FConfigFileFindConfigFile (const FString &Filename)
 
CORE_API FConfigFileFind (const FString &InFilename)
 
CORE_API bool ContainsConfigFile (const FConfigFile *ConfigFile) const
 
CORE_API FConfigFileFindConfigFileWithBaseName (FName BaseName)
 
CORE_API FConfigFileAdd (const FString &Filename, const FConfigFile &File)
 
CORE_API FConfigBranchFindBranch (FName BaseIniName, const FString &Filename)
 
CORE_API FConfigBranchFindBranchWithNoReload (FName BaseIniName, const FString &Filename)
 
CORE_API FConfigBranchAddNewBranch (const FString &Filename)
 
CORE_API int32 Remove (const FString &Filename)
 
CORE_API TArray< FString > GetFilenames ()
 
CORE_API void Flush (bool bRemoveFromCache, const FString &Filename=TEXT(""))
 
CORE_API void LoadFile (const FString &InFilename, const FConfigFile *Fallback=NULL, const TCHAR *PlatformString=NULL)
 
CORE_API void SetFile (const FString &InFilename, const FConfigFile *NewConfigFile)
 
CORE_API void UnloadFile (const FString &Filename)
 
CORE_API void Detach (const FString &Filename)
 
CORE_API bool GetString (const TCHAR *Section, const TCHAR *Key, FString &Value, const FString &Filename)
 
CORE_API bool GetText (const TCHAR *Section, const TCHAR *Key, FText &Value, const FString &Filename)
 
CORE_API bool GetSection (const TCHAR *Section, TArray< FString > &Result, const FString &Filename)
 
CORE_API bool DoesSectionExist (const TCHAR *Section, const FString &Filename)
 
CORE_API const FConfigSectionGetSection (const TCHAR *Section, const bool Force, const FString &Filename)
 
CORE_API void SetString (const TCHAR *Section, const TCHAR *Key, const TCHAR *Value, const FString &Filename)
 
CORE_API void SetText (const TCHAR *Section, const TCHAR *Key, const FText &Value, const FString &Filename)
 
CORE_API bool RemoveKey (const TCHAR *Section, const TCHAR *Key, const FString &Filename)
 
CORE_API bool EmptySection (const TCHAR *Section, const FString &Filename)
 
CORE_API bool EmptySectionsMatchingString (const TCHAR *SectionString, const FString &Filename)
 
CORE_API FString GetConfigFilename (const TCHAR *BaseIniName)
 
CORE_API void GetConfigFilenames (TArray< FString > &ConfigFilenames)
 
CORE_API bool GetSectionNames (const FString &Filename, TArray< FString > &out_SectionNames)
 
CORE_API bool GetPerObjectConfigSections (const FString &Filename, const FString &SearchClass, TArray< FString > &out_SectionNames, int32 MaxResults=1024)
 
CORE_API void Exit ()
 
CORE_API void Dump (FOutputDevice &Ar, const TCHAR *IniName=NULL)
 
CORE_API void ShowMemoryUsage (FOutputDevice &Ar)
 
CORE_API SIZE_T GetMaxMemoryUsage ()
 
CORE_API bool ForEachEntry (const FKeyValueSink &Visitor, const TCHAR *Section, const FString &Filename)
 
CORE_API FString GetStr (const TCHAR *Section, const TCHAR *Key, const FString &Filename)
 
CORE_API bool GetInt (const TCHAR *Section, const TCHAR *Key, int32 &Value, const FString &Filename)
 
CORE_API bool GetInt64 (const TCHAR *Section, const TCHAR *Key, int64 &Value, const FString &Filename)
 
CORE_API bool GetFloat (const TCHAR *Section, const TCHAR *Key, float &Value, const FString &Filename)
 
CORE_API bool GetDouble (const TCHAR *Section, const TCHAR *Key, double &Value, const FString &Filename)
 
CORE_API bool GetBool (const TCHAR *Section, const TCHAR *Key, bool &Value, const FString &Filename)
 
CORE_API int32 GetArray (const TCHAR *Section, const TCHAR *Key, TArray< FString > &out_Arr, const FString &Filename)
 
CORE_API int32 GetSingleLineArray (const TCHAR *Section, const TCHAR *Key, TArray< FString > &out_Arr, const FString &Filename)
 
CORE_API bool GetColor (const TCHAR *Section, const TCHAR *Key, FColor &Value, const FString &Filename)
 
CORE_API bool GetVector2D (const TCHAR *Section, const TCHAR *Key, FVector2D &Value, const FString &Filename)
 
CORE_API bool GetVector (const TCHAR *Section, const TCHAR *Key, FVector &Value, const FString &Filename)
 
CORE_API bool GetVector4 (const TCHAR *Section, const TCHAR *Key, FVector4 &Value, const FString &Filename)
 
CORE_API bool GetRotator (const TCHAR *Section, const TCHAR *Key, FRotator &Value, const FString &Filename)
 
bool GetValue (const TCHAR *Section, const TCHAR *Key, FString &Value, const FString &Filename)
 
bool GetValue (const TCHAR *Section, const TCHAR *Key, FText &Value, const FString &Filename)
 
bool GetValue (const TCHAR *Section, const TCHAR *Key, int32 &Value, const FString &Filename)
 
bool GetValue (const TCHAR *Section, const TCHAR *Key, float &Value, const FString &Filename)
 
bool GetValue (const TCHAR *Section, const TCHAR *Key, bool &Value, const FString &Filename)
 
int32 GetValue (const TCHAR *Section, const TCHAR *Key, TArray< FString > &Value, const FString &Filename)
 
int32 GetIntOrDefault (const TCHAR *Section, const TCHAR *Key, const int32 DefaultValue, const FString &Filename)
 
float GetFloatOrDefault (const TCHAR *Section, const TCHAR *Key, const float DefaultValue, const FString &Filename)
 
bool GetBoolOrDefault (const TCHAR *Section, const TCHAR *Key, const bool DefaultValue, const FString &Filename)
 
FString GetStringOrDefault (const TCHAR *Section, const TCHAR *Key, const FString &DefaultValue, const FString &Filename)
 
FText GetTextOrDefault (const TCHAR *Section, const TCHAR *Key, const FText &DefaultValue, const FString &Filename)
 
CORE_API void SetInt (const TCHAR *Section, const TCHAR *Key, int32 Value, const FString &Filename)
 
CORE_API void SetFloat (const TCHAR *Section, const TCHAR *Key, float Value, const FString &Filename)
 
CORE_API void SetDouble (const TCHAR *Section, const TCHAR *Key, double Value, const FString &Filename)
 
CORE_API void SetBool (const TCHAR *Section, const TCHAR *Key, bool Value, const FString &Filename)
 
CORE_API void SetArray (const TCHAR *Section, const TCHAR *Key, const TArray< FString > &Value, const FString &Filename)
 
CORE_API void SetSingleLineArray (const TCHAR *Section, const TCHAR *Key, const TArray< FString > &In_Arr, const FString &Filename)
 
CORE_API void SetColor (const TCHAR *Section, const TCHAR *Key, FColor Value, const FString &Filename)
 
CORE_API void SetVector2D (const TCHAR *Section, const TCHAR *Key, FVector2D Value, const FString &Filename)
 
CORE_API void SetVector (const TCHAR *Section, const TCHAR *Key, FVector Value, const FString &Filename)
 
CORE_API void SetVector4 (const TCHAR *Section, const TCHAR *Key, const FVector4 &Value, const FString &Filename)
 
CORE_API void SetRotator (const TCHAR *Section, const TCHAR *Key, FRotator Value, const FString &Filename)
 
CORE_API bool SetInSection (const TCHAR *Section, FName Key, const FString &Value, const FString &Filename)
 
CORE_API bool SetInSectionOfStaticLayer (const TCHAR *Section, FName Key, const FString &Value, const FString &BranchName, const FString &LayerSubstring, bool bWriteFile)
 
CORE_API bool AddToSection (const TCHAR *Section, FName Key, const FString &Value, const FString &Filename)
 
CORE_API bool AddToSectionOfStaticLayer (const TCHAR *Section, FName Key, const FString &Value, const FString &BranchName, const FString &LayerSubstring, bool bWriteFile)
 
CORE_API bool AddUniqueToSection (const TCHAR *Section, FName Key, const FString &Value, const FString &Filename)
 
CORE_API bool AddUniqueToSectionOfStaticLayer (const TCHAR *Section, FName Key, const FString &Value, const FString &BranchName, const FString &LayerSubstring, bool bWriteFile)
 
CORE_API bool RemoveKeyFromSection (const TCHAR *Section, FName Key, const FString &Filename)
 
CORE_API bool RemoveKeyFromSectionOfStaticLayer (const TCHAR *Section, FName Key, const FString &BranchName, const FString &LayerSubstring, bool bWriteFile)
 
CORE_API bool RemoveFromSection (const TCHAR *Section, FName Key, const FString &Value, const FString &Filename)
 
CORE_API bool RemoveFromSectionOfStaticLayer (const TCHAR *Section, FName Key, const FString &Value, const FString &BranchName, const FString &LayerSubstring, bool bWriteFile)
 
CORE_API bool ResetKeyInSection (const TCHAR *Section, FName Key, const FString &Filename)
 
CORE_API bool ResetKeyInSectionOfStaticLayer (const TCHAR *Section, FName Key, const FString &BranchName, const FString &LayerSubstring, bool bWriteFile)
 
CORE_API bool SetArrayInSectionOfStaticLayer (const TCHAR *Section, FName Key, const TArray< FString > &Values, bool bClearArray, const FString &BranchName, const FString &LayerSubstring, bool bWriteFile)
 
CORE_API bool SafeUnloadBranch (const TCHAR *Filename)
 
CORE_API bool RemoveSectionFromBranch (const TCHAR *Section, const TCHAR *Filename)
 
CORE_API void SaveCurrentStateForBootstrap (const TCHAR *Filename)
 
CORE_API void Serialize (FArchive &Ar)
 
CORE_API bool IsKnownConfigName (FName ConfigName)
 
CORE_API const TSet< FString > * GetStagedPluginConfigCache (FName PluginName) const
 
CORE_API const TSet< FString > * GetStagedGlobalConfigCache () const
 

Static Public Member Functions

static CORE_API void InitializeConfigSystem ()
 
static CORE_API const FString & GetCustomConfigString ()
 
static CORE_API FString GetDestIniFilename (const TCHAR *BaseIniName, const TCHAR *PlatformName, const TCHAR *GeneratedConfigDir)
 
static CORE_API bool LoadGlobalIniFile (FString &FinalIniFilename, const TCHAR *BaseIniName, const TCHAR *Platform=NULL, bool bForceReload=false, bool bRequireDefaultIni=false, bool bAllowGeneratedIniWhenCooked=true, bool bAllowRemoteConfig=true, const TCHAR *GeneratedConfigDir= *FPaths::GeneratedConfigDir(), FConfigCacheIni *ConfigSystem=GConfig)
 
static CORE_API bool LoadLocalIniFile (FConfigFile &ConfigFile, const TCHAR *IniName, bool bIsBaseIniName, const TCHAR *Platform=NULL, bool bForceReload=false)
 
static CORE_API bool LoadExternalIniFile (FConfigFile &ConfigFile, const TCHAR *IniName, const TCHAR *EngineConfigDir, const TCHAR *SourceConfigDir, bool bIsBaseIniName, const TCHAR *Platform=NULL, bool bForceReload=false, bool bWriteDestIni=false, bool bAllowGeneratedIniWhenCooked=true, const TCHAR *GeneratedConfigDir= *FPaths::GeneratedConfigDir())
 
static CORE_API void LoadConsoleVariablesFromINI ()
 
static CORE_API FString NormalizeConfigIniPath (const FString &NonNormalizedPath)
 
static CORE_API FConfigFileFindOrLoadPlatformConfig (FConfigFile &LocalFile, const TCHAR *IniName, const TCHAR *Platform=NULL)
 
static CORE_API FConfigFileFindPlatformConfig (const TCHAR *IniName, const TCHAR *Platform)
 
static CORE_API bool InitializeKnownConfigFiles (FConfigContext &Context)
 
static CORE_API bool CreateGConfigFromSaved (const TCHAR *Filename)
 
static CORE_API FConfigCacheIniForPlatform (FName PlatformName)
 
static CORE_API void ClearOtherPlatformConfigs ()
 
static CORE_API void RegisterPlugin (FName PluginName, const FString &PluginDir, const TArray< FString > &ChildPluginDirs, DynamicLayerPriority Priority, bool bIncludePluginNameInBranchName)
 
static CORE_API void AddPluginToAllBranches (FName PluginName, FConfigModificationTracker *ModificationTracker=nullptr)
 
static CORE_API void AddMultiplePluginsToAllBranches (const TArray< FName > &PluginName, FConfigModificationTracker *ModificationTracker=nullptr)
 
static CORE_API void RemoveTagFromAllBranches (FName Tag, FConfigModificationTracker *ModificationTracker=nullptr)
 
static CORE_API void RemoveMultipleTagsFromAllBranches (const TArray< FName > &Tags, FConfigModificationTracker *ModificationTracker=nullptr)
 
static CORE_API void PreInitializePlatformPlugins ()
 

Friends

bool MakeBinaryConfig (const TCHAR *CmdLine)
 

Constructor & Destructor Documentation

◆ FConfigCacheIni() [1/2]

FConfigCacheIni::FConfigCacheIni ( EConfigCacheType  Type,
FName  PlatformName = NAME_None,
bool  bInGloballyRegistered = false 
)

◆ FConfigCacheIni() [2/2]

FConfigCacheIni::FConfigCacheIni ( )

DO NOT USE. This constructor is for internal usage only for hot-reload purposes.

◆ ~FConfigCacheIni()

FConfigCacheIni::~FConfigCacheIni ( )
virtual

Member Function Documentation

◆ Add()

FConfigFile & FConfigCacheIni::Add ( const FString &  Filename,
const FConfigFile File 
)

◆ AddMultiplePluginsToAllBranches()

void FConfigCacheIni::AddMultiplePluginsToAllBranches ( const TArray< FName > &  PluginName,
FConfigModificationTracker ModificationTracker = nullptr 
)
static

◆ AddNewBranch()

FConfigBranch & FConfigCacheIni::AddNewBranch ( const FString &  Filename)

Create a new branch for FIlename, and return it

◆ AddPluginToAllBranches()

void FConfigCacheIni::AddPluginToAllBranches ( FName  PluginName,
FConfigModificationTracker ModificationTracker = nullptr 
)
static

◆ AddToSection()

bool FConfigCacheIni::AddToSection ( const TCHAR Section,
FName  Key,
const FString &  Value,
const FString &  Filename 
)

Adds the given key/value pair to the Section in the given File. This will always add this pair to the section, even if the pair already exists. This is equivalent to the . operator in .ini files

Returns
true if the section was modified

◆ AddToSectionOfStaticLayer()

bool FConfigCacheIni::AddToSectionOfStaticLayer ( const TCHAR Section,
FName  Key,
const FString &  Value,
const FString &  BranchName,
const FString &  LayerSubstring,
bool  bWriteFile 
)

◆ AddUniqueToSection()

bool FConfigCacheIni::AddUniqueToSection ( const TCHAR Section,
FName  Key,
const FString &  Value,
const FString &  Filename 
)

Adds the given key/value pair to the Section in the given File, if the pair didn't already exist This is equivalent to the + operator in .ini files

Returns
true if the section was modified

◆ AddUniqueToSectionOfStaticLayer()

bool FConfigCacheIni::AddUniqueToSectionOfStaticLayer ( const TCHAR Section,
FName  Key,
const FString &  Value,
const FString &  BranchName,
const FString &  LayerSubstring,
bool  bWriteFile 
)

◆ AreFileOperationsDisabled()

bool FConfigCacheIni::AreFileOperationsDisabled ( )

Returns whether or not file operations are disabled

◆ ClearOtherPlatformConfigs()

void FConfigCacheIni::ClearOtherPlatformConfigs ( )
static

Wipe all cached platform configs. Next ForPlatform call will load on-demand the platform configs

◆ ContainsConfigFile()

bool FConfigCacheIni::ContainsConfigFile ( const FConfigFile ConfigFile) const

Reports whether an FConfigFile* is pointing to a config file inside of this Used for downstream functions to check whether a config file they were passed came from this ConfigCacheIni or from a different source such as LoadLocalIniFile

◆ CreateGConfigFromSaved()

static CORE_API bool FConfigCacheIni::CreateGConfigFromSaved ( const TCHAR Filename)
static

Create GConfig from a saved file

◆ Detach()

void FConfigCacheIni::Detach ( const FString &  Filename)

◆ DisableFileOperations()

void FConfigCacheIni::DisableFileOperations ( )

Disables any file IO by the config cache system

◆ DoesSectionExist()

bool FConfigCacheIni::DoesSectionExist ( const TCHAR Section,
const FString &  Filename 
)

◆ Dump()

void FConfigCacheIni::Dump ( FOutputDevice Ar,
const TCHAR IniName = NULL 
)

Prints out the entire config set, or just a single file if an ini is specified

Parameters
Arthe device to write to
IniNameAn optional ini name to restrict the writing to (Engine or WrangleContent) - meant to be used with "final" .ini files (not Default*)

◆ EmptySection()

bool FConfigCacheIni::EmptySection ( const TCHAR Section,
const FString &  Filename 
)

◆ EmptySectionsMatchingString()

bool FConfigCacheIni::EmptySectionsMatchingString ( const TCHAR SectionString,
const FString &  Filename 
)

◆ EnableFileOperations()

void FConfigCacheIni::EnableFileOperations ( )

Re-enables file IO by the config cache system

◆ Exit()

void FConfigCacheIni::Exit ( )

◆ Find()

FConfigFile * FConfigCacheIni::Find ( const FString &  InFilename)

Finds, loads, or creates the in-memory config file for a config cache filename.

Parameters
Aknown key like GEngineIni, or the return value of GetConfigFilename
Returns
A new or existing config file

◆ FindBranch()

FConfigBranch * FConfigCacheIni::FindBranch ( FName  BaseIniName,
const FString &  Filename 
)

Finds an FConfigBranch, using base name or a filename (can pass in NAME_None or empty string as needed)

◆ FindBranchWithNoReload()

FConfigBranch * FConfigCacheIni::FindBranchWithNoReload ( FName  BaseIniName,
const FString &  Filename 
)

Same as FindBranch, but this will not reload a formerly SafeUnload'd branch

◆ FindConfigFile()

FConfigFile * FConfigCacheIni::FindConfigFile ( const FString &  Filename)

Finds the in-memory config file for a config cache filename.

Parameters
Aknown key like GEngineIni, or the return value of GetConfigFilename
Returns
The existing config file or null if it does not exist in memory

◆ FindConfigFileWithBaseName()

FConfigFile * FConfigCacheIni::FindConfigFileWithBaseName ( FName  BaseName)

Finds Config file that matches the base name such as "Engine"

◆ FindOrLoadPlatformConfig()

FConfigFile * FConfigCacheIni::FindOrLoadPlatformConfig ( FConfigFile LocalFile,
const TCHAR IniName,
const TCHAR Platform = NULL 
)
static

This helper function searches the cache before trying to load the ini file using LoadLocalIniFile. Note that the returned FConfigFile pointer must have the same lifetime as the passed in LocalFile.

Parameters
LocalFileThe output object to fill. If the FConfigFile is found in the cache, this won't be used.
IniNameEither a Base ini name (Engine) or a full ini name (WrangleContent). NO PATH OR EXTENSION SHOULD BE USED!
PlatformThe platform to use for Base ini names, NULL means to use the current platform
Returns
FConfigFile Found or loaded FConfigFile

◆ FindPlatformConfig()

FConfigFile * FConfigCacheIni::FindPlatformConfig ( const TCHAR IniName,
const TCHAR Platform 
)
static

Attempts to find the platform config in the cache.

Parameters
IniNameEither a Base ini name (Engine) or a full ini name (WrangleContent). NO PATH OR EXTENSION SHOULD BE USED!
PlatformThe platform to use for Base ini names, NULL means to use the current platform
Returns
FConfigFile Found FConfigFile

◆ Flush()

void FConfigCacheIni::Flush ( bool  bRemoveFromCache,
const FString &  Filename = TEXT("") 
)

◆ ForEachEntry()

bool FConfigCacheIni::ForEachEntry ( const FKeyValueSink Visitor,
const TCHAR Section,
const FString &  Filename 
)

allows to iterate through all key value pairs

Returns
false:error e.g. Section or Filename not found

◆ ForPlatform()

FConfigCacheIni * FConfigCacheIni::ForPlatform ( FName  PlatformName)
static

Retrieve the fully processed ini system for another platform. The editor will start loading these in the background on startup

◆ GetArray()

int32 FConfigCacheIni::GetArray ( const TCHAR Section,
const TCHAR Key,
TArray< FString > &  out_Arr,
const FString &  Filename 
)

◆ GetBool()

bool FConfigCacheIni::GetBool ( const TCHAR Section,
const TCHAR Key,
bool Value,
const FString &  Filename 
)

◆ GetBoolOrDefault()

bool FConfigCacheIni::GetBoolOrDefault ( const TCHAR Section,
const TCHAR Key,
const bool  DefaultValue,
const FString &  Filename 
)
inline

◆ GetColor()

bool FConfigCacheIni::GetColor ( const TCHAR Section,
const TCHAR Key,
FColor Value,
const FString &  Filename 
)

◆ GetConfigFilename()

FString FConfigCacheIni::GetConfigFilename ( const TCHAR BaseIniName)

For a base ini name, gets the config cache filename key that is used by other functions like Find. This will be the base name for known configs like Engine and the destination filename for others.

Parameters
IniBaseNameBase name of the .ini (Engine, Game, CustomSystem)
Returns
Filename key used by other cache functions

◆ GetConfigFilenames()

void FConfigCacheIni::GetConfigFilenames ( TArray< FString > &  ConfigFilenames)

Retrieve a list of all of the config files stored in the cache

Parameters
ConfigFilenamesOut array to receive the list of filenames

◆ GetCustomConfigString()

const FString & FConfigCacheIni::GetCustomConfigString ( )
static

Returns the Custom Config string, which if set will load additional config files from Config/Custom/{CustomConfig}/DefaultX.ini to allow different types of builds. It can be set from a game Target.cs file with CustomConfig = "Name". Or in development, it can be overridden with a -CustomConfig=Name command line parameter.

◆ GetDestIniFilename()

FString FConfigCacheIni::GetDestIniFilename ( const TCHAR BaseIniName,
const TCHAR PlatformName,
const TCHAR GeneratedConfigDir 
)
static

Calculates the name of a dest (generated) .ini file for a given base (ie Engine, Game, etc)

Parameters
IniBaseNameBase name of the .ini (Engine, Game)
PlatformNameName of the platform to get the .ini path for (nullptr means to use the current platform)
GeneratedConfigDirThe base folder that will contain the generated config files.
Returns
Standardized .ini filename

◆ GetDouble()

bool FConfigCacheIni::GetDouble ( const TCHAR Section,
const TCHAR Key,
double Value,
const FString &  Filename 
)

◆ GetFilenames()

TArray< FString > FConfigCacheIni::GetFilenames ( )

◆ GetFloat()

bool FConfigCacheIni::GetFloat ( const TCHAR Section,
const TCHAR Key,
float Value,
const FString &  Filename 
)

◆ GetFloatOrDefault()

float FConfigCacheIni::GetFloatOrDefault ( const TCHAR Section,
const TCHAR Key,
const float  DefaultValue,
const FString &  Filename 
)
inline

◆ GetInt()

bool FConfigCacheIni::GetInt ( const TCHAR Section,
const TCHAR Key,
int32 Value,
const FString &  Filename 
)

◆ GetInt64()

bool FConfigCacheIni::GetInt64 ( const TCHAR Section,
const TCHAR Key,
int64 Value,
const FString &  Filename 
)

◆ GetIntOrDefault()

int32 FConfigCacheIni::GetIntOrDefault ( const TCHAR Section,
const TCHAR Key,
const int32  DefaultValue,
const FString &  Filename 
)
inline

◆ GetMaxMemoryUsage()

SIZE_T FConfigCacheIni::GetMaxMemoryUsage ( )

USed to get the max memory usage for the FConfigCacheIni

Returns
the amount of memory in byes

◆ GetPerObjectConfigSections()

bool FConfigCacheIni::GetPerObjectConfigSections ( const FString &  Filename,
const FString &  SearchClass,
TArray< FString > &  out_SectionNames,
int32  MaxResults = 1024 
)

Retrieve the names of sections which contain data for the specified PerObjectConfig class.

Parameters
Filenamethe file to retrieve section names from
SearchClassthe name of the PerObjectConfig class to retrieve sections for.
out_SectionNameswill receive the list of section names that correspond to PerObjectConfig sections of the specified class
MaxResultsthe maximum number of section names to retrieve
Returns
true if the file specified was found and it contained at least 1 section for the specified class

◆ GetRotator()

bool FConfigCacheIni::GetRotator ( const TCHAR Section,
const TCHAR Key,
FRotator Value,
const FString &  Filename 
)

◆ GetSection() [1/2]

const FConfigSection * FConfigCacheIni::GetSection ( const TCHAR Section,
const bool  Force,
const FString &  Filename 
)

◆ GetSection() [2/2]

bool FConfigCacheIni::GetSection ( const TCHAR Section,
TArray< FString > &  Result,
const FString &  Filename 
)

◆ GetSectionNames()

bool FConfigCacheIni::GetSectionNames ( const FString &  Filename,
TArray< FString > &  out_SectionNames 
)

Retrieve the names for all sections contained in the file specified by Filename

Parameters
Filenamethe file to retrieve section names from
out_SectionNameswill receive the list of section names
Returns
true if the file specified was successfully found;

◆ GetSingleLineArray()

int32 FConfigCacheIni::GetSingleLineArray ( const TCHAR Section,
const TCHAR Key,
TArray< FString > &  out_Arr,
const FString &  Filename 
)

Loads a "delimited" list of strings

Parameters
Section- Section of the ini file to load from
Key- The key in the section of the ini file to load
out_Arr- Array to load into
Filename- Ini file to load from

Loads a "delimited" list of string

Parameters
Section- Section of the ini file to load from
Key- The key in the section of the ini file to load
out_Arr- Array to load into
Delimiter- Break in the strings
Filename- Ini file to load from

◆ GetStagedGlobalConfigCache()

const TSet< FString > * FConfigCacheIni::GetStagedGlobalConfigCache ( ) const

Returns the staged global config cache

◆ GetStagedPluginConfigCache()

const TSet< FString > * FConfigCacheIni::GetStagedPluginConfigCache ( FName  PluginName) const

Finds the Staged Plugin ConfigCache if it exists from a PluginName Returns a pointer to the cache if it exists, a nullptr if not

◆ GetStr()

FString FConfigCacheIni::GetStr ( const TCHAR Section,
const TCHAR Key,
const FString &  Filename 
)

◆ GetString()

bool FConfigCacheIni::GetString ( const TCHAR Section,
const TCHAR Key,
FString &  Value,
const FString &  Filename 
)

◆ GetStringOrDefault()

FString FConfigCacheIni::GetStringOrDefault ( const TCHAR Section,
const TCHAR Key,
const FString &  DefaultValue,
const FString &  Filename 
)
inline

◆ GetText()

bool FConfigCacheIni::GetText ( const TCHAR Section,
const TCHAR Key,
FText Value,
const FString &  Filename 
)

◆ GetTextOrDefault()

FText FConfigCacheIni::GetTextOrDefault ( const TCHAR Section,
const TCHAR Key,
const FText DefaultValue,
const FString &  Filename 
)
inline

◆ GetValue() [1/6]

bool FConfigCacheIni::GetValue ( const TCHAR Section,
const TCHAR Key,
bool Value,
const FString &  Filename 
)
inline

◆ GetValue() [2/6]

bool FConfigCacheIni::GetValue ( const TCHAR Section,
const TCHAR Key,
float Value,
const FString &  Filename 
)
inline

◆ GetValue() [3/6]

bool FConfigCacheIni::GetValue ( const TCHAR Section,
const TCHAR Key,
FString &  Value,
const FString &  Filename 
)
inline

◆ GetValue() [4/6]

bool FConfigCacheIni::GetValue ( const TCHAR Section,
const TCHAR Key,
FText Value,
const FString &  Filename 
)
inline

◆ GetValue() [5/6]

bool FConfigCacheIni::GetValue ( const TCHAR Section,
const TCHAR Key,
int32 Value,
const FString &  Filename 
)
inline

◆ GetValue() [6/6]

int32 FConfigCacheIni::GetValue ( const TCHAR Section,
const TCHAR Key,
TArray< FString > &  Value,
const FString &  Filename 
)
inline

◆ GetVector()

bool FConfigCacheIni::GetVector ( const TCHAR Section,
const TCHAR Key,
FVector Value,
const FString &  Filename 
)

◆ GetVector2D()

bool FConfigCacheIni::GetVector2D ( const TCHAR Section,
const TCHAR Key,
FVector2D Value,
const FString &  Filename 
)

◆ GetVector4()

bool FConfigCacheIni::GetVector4 ( const TCHAR Section,
const TCHAR Key,
FVector4 Value,
const FString &  Filename 
)

◆ InitializeConfigSystem()

void FConfigCacheIni::InitializeConfigSystem ( )
static

Creates GConfig, loads the standard global ini files (Engine, Editor, etc), fills out GEngineIni, etc. and marks GConfig as ready for use

◆ InitializeKnownConfigFiles()

bool FConfigCacheIni::InitializeKnownConfigFiles ( FConfigContext Context)
static

Load the standard (used on all platforms) ini files, like Engine, Input, etc

Parameters
FConfigContextThe loading context that controls the destination of the loaded ini files

return True if the engine ini was loaded

◆ IsGloballyRegistered()

bool FConfigCacheIni::IsGloballyRegistered ( ) const
inline

Return whether this is one of the global ConfigSystems: GConfig or FConfigCacheIni::ForPlatform.

◆ IsKnownConfigName()

bool FConfigCacheIni::IsKnownConfigName ( FName  ConfigName)

Returns true if the given name is one of the known configs, where the matching G****Ini property is going to match the base name ("Engine" returns true, which means GEngineIni's value is just "Engine")

◆ IsReadyForUse()

bool FConfigCacheIni::IsReadyForUse ( )
inline
Returns
true after after the basic .ini files have been loaded

◆ LoadConsoleVariablesFromINI()

void FConfigCacheIni::LoadConsoleVariablesFromINI ( )
static

Needs to be called after GConfig is set and LoadCoalescedFile was called. Loads the state of console variables. Works even if the variable is registered after the ini file was loaded.

◆ LoadExternalIniFile()

bool FConfigCacheIni::LoadExternalIniFile ( FConfigFile ConfigFile,
const TCHAR IniName,
const TCHAR EngineConfigDir,
const TCHAR SourceConfigDir,
bool  bIsBaseIniName,
const TCHAR Platform = NULL,
bool  bForceReload = false,
bool  bWriteDestIni = false,
bool  bAllowGeneratedIniWhenCooked = true,
const TCHAR GeneratedConfigDir = *FPaths::GeneratedConfigDir() 
)
static

Load an ini file directly into an FConfigFile from the specified config folders, optionally writing to disk. The passed in .ini name can be a "base" (Engine, Game) which will be modified by platform and/or commandline override, or it can be a full ini filename (ie WrangleContent) loaded from the Source config directory

Parameters
ConfigFileThe output object to fill
IniNameEither a Base ini name (Engine) or a full ini name (WrangleContent). NO PATH OR EXTENSION SHOULD BE USED!
EngineConfigDirEngine config directory.
SourceConfigDirGame config directory.
bIsBaseIniNametrue if IniName is a Base name, which can be overridden on commandline, etc.
PlatformThe platform to use for Base ini names
bForceReloadforce reload the ini file from disk this is required if you make changes to the ini file not using the config system as the hierarchy cache will not be updated in this case
bWriteDestIniwrite out a destination ini file to the Saved folder, only valid if bIsBaseIniName is true
bAllowGeneratedIniWhenCookedIf true, the engine will attempt to load the generated/user INI file when loading cooked games
GeneratedConfigDirThe location where generated config files are made.
Returns
true if the ini file was loaded successfully

◆ LoadFile()

void FConfigCacheIni::LoadFile ( const FString &  InFilename,
const FConfigFile Fallback = NULL,
const TCHAR PlatformString = NULL 
)

◆ LoadGlobalIniFile()

bool FConfigCacheIni::LoadGlobalIniFile ( FString &  FinalIniFilename,
const TCHAR BaseIniName,
const TCHAR Platform = NULL,
bool  bForceReload = false,
bool  bRequireDefaultIni = false,
bool  bAllowGeneratedIniWhenCooked = true,
bool  bAllowRemoteConfig = true,
const TCHAR GeneratedConfigDir = *FPaths::GeneratedConfigDir(),
FConfigCacheIni ConfigSystem = GConfig 
)
static

Loads and generates a destination ini file and adds it to GConfig:

  • Looking on commandline for override source/dest .ini filenames
  • Generating the name for the engine to refer to the ini
  • Loading a source .ini file hierarchy
  • Filling out an FConfigFile
  • Save the generated ini
  • Adds the FConfigFile to GConfig
Parameters
FinalIniFilenameThe output name of the generated .ini file (in Game\Saved\Config)
BaseIniNameThe "base" ini name, with no extension (ie, Engine, Game, etc)
PlatformThe platform to load the .ini for (if NULL, uses current)
bForceReloadIf true, the destination .in will be regenerated from the source, otherwise this will only process if the dest isn't in GConfig
bRequireDefaultIniIf true, the Default*.ini file is required to exist when generating the final ini file.
bAllowGeneratedIniWhenCookedIf true, the engine will attempt to load the generated/user INI file when loading cooked games
GeneratedConfigDirThe location where generated config files are made.
Returns
true if the final ini was created successfully.

◆ LoadLocalIniFile()

bool FConfigCacheIni::LoadLocalIniFile ( FConfigFile ConfigFile,
const TCHAR IniName,
bool  bIsBaseIniName,
const TCHAR Platform = NULL,
bool  bForceReload = false 
)
static

Load an ini file directly into an FConfigFile, and nothing is written to GConfig or disk. The passed in .ini name can be a "base" (Engine, Game) which will be modified by platform and/or commandline override, or it can be a full ini filename (ie WrangleContent) loaded from the Source config directory

Parameters
ConfigFileThe output object to fill
IniNameEither a Base ini name (Engine) or a full ini name (WrangleContent). NO PATH OR EXTENSION SHOULD BE USED!
bIsBaseIniNametrue if IniName is a Base name, which can be overridden on commandline, etc.
PlatformThe platform to use for Base ini names, NULL means to use the current platform
bForceReloadforce reload the ini file from disk this is required if you make changes to the ini file not using the config system as the hierarchy cache will not be updated in this case
Returns
true if the ini file was loaded successfully

◆ NormalizeConfigIniPath()

FString FConfigCacheIni::NormalizeConfigIniPath ( const FString &  NonNormalizedPath)
static

Normalizes file paths to INI files.

If an INI file is accessed with multiple paths, then we can run into issues where we cache multiple versions of the file. Specifically, any updates to the file may only be applied to one cached version, and could cause changes to be lost.

E.G.

// Standard path.
C:\ProjectDir\Engine\Config\DefaultEngine.ini

// Lowercase drive, and an extra slash between ProjectDir and Engine.
c:\ProjectDir\\Engine\Confg\DefaultEngine.ini

// Relative to a project binary.
..\..\..\ConfigDefaultEngine.ini

The paths above could all be used to reference the same ini file (namely, DefaultEngine.ini).
However, they would end up generating unique entries in the GConfigCache.
That means any modifications to *one* of the entries would not propagate to the others, and if
any / all of the ini files are saved, they will stomp changes to the other entries.

We can prevent these types of issues by enforcing normalized paths when accessing configs.
Parameters
NonNormalizedPathThe path to the INI file we want to access.
Returns
A normalized version of the path (may be the same as the input).

◆ Parse1ToNSectionOfNames()

void FConfigCacheIni::Parse1ToNSectionOfNames ( const TCHAR Section,
const TCHAR KeyOne,
const TCHAR KeyN,
TMap< FName, TArray< FName > > &  OutMap,
const FString &  Filename 
)

Parses apart an ini section that contains a list of 1-to-N mappings of names in the following format [PerMapPackages] MapName=Map1 Package=PackageA Package=PackageB MapName=Map2 Package=PackageC Package=PackageD

Parameters
SectionName of section to look in
KeyOneKey to use for the 1 in the 1-to-N (MapName in the above example)
KeyNKey to use for the N in the 1-to-N (Package in the above example)
OutMapMap containing parsed results
FilenameFilename to use to find the section

NOTE: The function naming is weird because you can't apparently have an overridden function differnt only by template type params

Parses apart an ini section that contains a list of 1-to-N mappings of names in the following format [PerMapPackages] .MapName1=Map1 .Package1=PackageA .Package1=PackageB .MapName2=Map2 .Package2=PackageC .Package2=PackageD

Parameters
SectionName of section to look in
KeyOneKey to use for the 1 in the 1-to-N (MapName in the above example - the number suffix gets ignored but helps to keep ordering)
KeyNKey to use for the N in the 1-to-N (Package in the above example - the number suffix gets ignored but helps to keep ordering)
OutMapMap containing parsed results
FilenameFilename to use to find the section

NOTE: The function naming is weird because you can't apparently have an overridden function differnt only by template type params

◆ Parse1ToNSectionOfStrings()

void FConfigCacheIni::Parse1ToNSectionOfStrings ( const TCHAR Section,
const TCHAR KeyOne,
const TCHAR KeyN,
TMap< FString, TArray< FString > > &  OutMap,
const FString &  Filename 
)

Prases apart an ini section that contains a list of 1-to-N mappings of strings in the following format [PerMapPackages] MapName=Map1 Package=PackageA Package=PackageB MapName=Map2 Package=PackageC Package=PackageD

Parameters
SectionName of section to look in
KeyOneKey to use for the 1 in the 1-to-N (MapName in the above example)
KeyNKey to use for the N in the 1-to-N (Package in the above example)
OutMapMap containing parsed results
FilenameFilename to use to find the section

NOTE: The function naming is weird because you can't apparently have an overridden function differnt only by template type params

Parses apart an ini section that contains a list of 1-to-N mappings of strings in the following format [PerMapPackages] .MapName1=Map1 .Package1=PackageA .Package1=PackageB .MapName2=Map2 .Package2=PackageC .Package2=PackageD

Parameters
SectionName of section to look in
KeyOneKey to use for the 1 in the 1-to-N (MapName in the above example - the number suffix gets ignored but helps to keep ordering)
KeyNKey to use for the N in the 1-to-N (Package in the above example - the number suffix gets ignored but helps to keep ordering)
OutMapMap containing parsed results
FilenameFilename to use to find the section

NOTE: The function naming is weird because you can't apparently have an overridden function differnt only by template type params

◆ PreInitializePlatformPlugins()

void FConfigCacheIni::PreInitializePlatformPlugins ( )
static

Initializes configs and plugins for every supported platform on worker threads. This function can be called prior to normal platform initialization to speed up the full initialization process.

◆ RegisterPlugin()

void FConfigCacheIni::RegisterPlugin ( FName  PluginName,
const FString &  PluginDir,
const TArray< FString > &  ChildPluginDirs,
DynamicLayerPriority  Priority,
bool  bIncludePluginNameInBranchName 
)
static

Tell GConfig and the ForPlatform config systems about a plugin location

◆ Remove()

int32 FConfigCacheIni::Remove ( const FString &  Filename)

◆ RemoveFromSection()

bool FConfigCacheIni::RemoveFromSection ( const TCHAR Section,
FName  Key,
const FString &  Value,
const FString &  Filename 
)

Removes every entry in the Section in the given File that has the Key/Value pair This is equivalent to the - operator in .ini files (although it will remove all instances of the pair, not just a single one)

Returns
true if the section was modified

◆ RemoveFromSectionOfStaticLayer()

bool FConfigCacheIni::RemoveFromSectionOfStaticLayer ( const TCHAR Section,
FName  Key,
const FString &  Value,
const FString &  BranchName,
const FString &  LayerSubstring,
bool  bWriteFile 
)

◆ RemoveKey()

bool FConfigCacheIni::RemoveKey ( const TCHAR Section,
const TCHAR Key,
const FString &  Filename 
)

◆ RemoveKeyFromSection()

bool FConfigCacheIni::RemoveKeyFromSection ( const TCHAR Section,
FName  Key,
const FString &  Filename 
)

Removes every entry in the Section in the given File that has Key, no matter what the Value is This is equivalent to the ! operator in .ini files

Returns
true if the section was modified

◆ RemoveKeyFromSectionOfStaticLayer()

bool FConfigCacheIni::RemoveKeyFromSectionOfStaticLayer ( const TCHAR Section,
FName  Key,
const FString &  BranchName,
const FString &  LayerSubstring,
bool  bWriteFile 
)

◆ RemoveMultipleTagsFromAllBranches()

void FConfigCacheIni::RemoveMultipleTagsFromAllBranches ( const TArray< FName > &  Tags,
FConfigModificationTracker ModificationTracker = nullptr 
)
static

◆ RemoveSectionFromBranch()

bool FConfigCacheIni::RemoveSectionFromBranch ( const TCHAR Section,
const TCHAR Filename 
)

Removes the section completely from all layers of a branch. This is destructive! It will not reload on demand (like SafeUnloadBranch does). Use this only when you know you will never need the values in the section again!

Returns
true if anything was removed

◆ RemoveTagFromAllBranches()

void FConfigCacheIni::RemoveTagFromAllBranches ( FName  Tag,
FConfigModificationTracker ModificationTracker = nullptr 
)
static

◆ ResetKeyInSection()

bool FConfigCacheIni::ResetKeyInSection ( const TCHAR Section,
FName  Key,
const FString &  Filename 
)

Similar to RemvoeKeyFromSection, but if this File's changes are being tracked, then we remove all changes to the the key that have been tracked. This would be used to remove enries in a layer so that the values from previous layers are used, unmodified. "Reset To Defaults" This is equivalent to deleting the keys from a .ini file

Returns
true if the section was modified

◆ ResetKeyInSectionOfStaticLayer()

bool FConfigCacheIni::ResetKeyInSectionOfStaticLayer ( const TCHAR Section,
FName  Key,
const FString &  BranchName,
const FString &  LayerSubstring,
bool  bWriteFile 
)

◆ SafeUnloadBranch()

bool FConfigCacheIni::SafeUnloadBranch ( const TCHAR Filename)

Clears out the memory of a branch, but can reload it on demand if needed

◆ SaveCurrentStateForBootstrap()

void FConfigCacheIni::SaveCurrentStateForBootstrap ( const TCHAR Filename)

Save the current config cache state into a file for bootstrapping other processes.

◆ Serialize()

void FConfigCacheIni::Serialize ( FArchive Ar)

◆ SetArray()

void FConfigCacheIni::SetArray ( const TCHAR Section,
const TCHAR Key,
const TArray< FString > &  Value,
const FString &  Filename 
)

◆ SetArrayInSectionOfStaticLayer()

bool FConfigCacheIni::SetArrayInSectionOfStaticLayer ( const TCHAR Section,
FName  Key,
const TArray< FString > &  Values,
bool  bClearArray,
const FString &  BranchName,
const FString &  LayerSubstring,
bool  bWriteFile 
)

◆ SetBool()

void FConfigCacheIni::SetBool ( const TCHAR Section,
const TCHAR Key,
bool  Value,
const FString &  Filename 
)

◆ SetColor()

void FConfigCacheIni::SetColor ( const TCHAR Section,
const TCHAR Key,
FColor  Value,
const FString &  Filename 
)

◆ SetDouble()

void FConfigCacheIni::SetDouble ( const TCHAR Section,
const TCHAR Key,
double  Value,
const FString &  Filename 
)

◆ SetFile()

void FConfigCacheIni::SetFile ( const FString &  InFilename,
const FConfigFile NewConfigFile 
)

◆ SetFloat()

void FConfigCacheIni::SetFloat ( const TCHAR Section,
const TCHAR Key,
float  Value,
const FString &  Filename 
)

◆ SetInSection()

bool FConfigCacheIni::SetInSection ( const TCHAR Section,
FName  Key,
const FString &  Value,
const FString &  Filename 
)

Sets the given key/value pair to the Section in the given File. This will replace any existing values (as if ResetKeyInSection had been called)

Returns
true if the section was modified

◆ SetInSectionOfStaticLayer()

bool FConfigCacheIni::SetInSectionOfStaticLayer ( const TCHAR Section,
FName  Key,
const FString &  Value,
const FString &  BranchName,
const FString &  LayerSubstring,
bool  bWriteFile 
)

◆ SetInt()

void FConfigCacheIni::SetInt ( const TCHAR Section,
const TCHAR Key,
int32  Value,
const FString &  Filename 
)

◆ SetRotator()

void FConfigCacheIni::SetRotator ( const TCHAR Section,
const TCHAR Key,
FRotator  Value,
const FString &  Filename 
)

◆ SetSingleLineArray()

void FConfigCacheIni::SetSingleLineArray ( const TCHAR Section,
const TCHAR Key,
const TArray< FString > &  In_Arr,
const FString &  Filename 
)

Saves a "delimited" list of strings

Parameters
Section- Section of the ini file to save to
Key- The key in the section of the ini file to save
out_Arr- Array to save from
Filename- Ini file to save to

Saves a "delimited" list of strings

Parameters
Section- Section of the ini file to save to
Key- The key in the section of the ini file to save
In_Arr- Array to save from
Filename- Ini file to save to

◆ SetString()

void FConfigCacheIni::SetString ( const TCHAR Section,
const TCHAR Key,
const TCHAR Value,
const FString &  Filename 
)

◆ SetText()

void FConfigCacheIni::SetText ( const TCHAR Section,
const TCHAR Key,
const FText Value,
const FString &  Filename 
)

◆ SetVector()

void FConfigCacheIni::SetVector ( const TCHAR Section,
const TCHAR Key,
FVector  Value,
const FString &  Filename 
)

◆ SetVector2D()

void FConfigCacheIni::SetVector2D ( const TCHAR Section,
const TCHAR Key,
FVector2D  Value,
const FString &  Filename 
)

◆ SetVector4()

void FConfigCacheIni::SetVector4 ( const TCHAR Section,
const TCHAR Key,
const FVector4 Value,
const FString &  Filename 
)

◆ ShowMemoryUsage()

void FConfigCacheIni::ShowMemoryUsage ( FOutputDevice Ar)

Dumps memory stats for each file in the config cache to the specified archive.

Parameters
Arthe output device to dump the results to

◆ Tick()

void FConfigCacheIni::Tick ( float  DeltaSeconds)

Allow for periodic cleanup or other tasks

◆ UnloadFile()

void FConfigCacheIni::UnloadFile ( const FString &  Filename)

Friends And Related Symbol Documentation

◆ MakeBinaryConfig

bool MakeBinaryConfig ( const TCHAR CmdLine)
friend

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