![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#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 FConfigFile * | FindConfigFile (const FString &Filename) |
| CORE_API FConfigFile * | Find (const FString &InFilename) |
| CORE_API bool | ContainsConfigFile (const FConfigFile *ConfigFile) const |
| CORE_API FConfigFile * | FindConfigFileWithBaseName (FName BaseName) |
| CORE_API FConfigFile & | Add (const FString &Filename, const FConfigFile &File) |
| CORE_API FConfigBranch * | FindBranch (FName BaseIniName, const FString &Filename) |
| CORE_API FConfigBranch * | FindBranchWithNoReload (FName BaseIniName, const FString &Filename) |
| CORE_API FConfigBranch & | AddNewBranch (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 FConfigSection * | GetSection (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 |
Friends | |
| bool | MakeBinaryConfig (const TCHAR *CmdLine) |
| FConfigCacheIni::FConfigCacheIni | ( | EConfigCacheType | Type, |
| FName | PlatformName = NAME_None, |
||
| bool | bInGloballyRegistered = false |
||
| ) |
| FConfigCacheIni::FConfigCacheIni | ( | ) |
DO NOT USE. This constructor is for internal usage only for hot-reload purposes.
|
virtual |
| FConfigFile & FConfigCacheIni::Add | ( | const FString & | Filename, |
| const FConfigFile & | File | ||
| ) |
|
static |
| FConfigBranch & FConfigCacheIni::AddNewBranch | ( | const FString & | Filename | ) |
Create a new branch for FIlename, and return it
|
static |
| 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
| bool FConfigCacheIni::AddToSectionOfStaticLayer | ( | const TCHAR * | Section, |
| FName | Key, | ||
| const FString & | Value, | ||
| const FString & | BranchName, | ||
| const FString & | LayerSubstring, | ||
| bool | bWriteFile | ||
| ) |
| 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
| bool FConfigCacheIni::AddUniqueToSectionOfStaticLayer | ( | const TCHAR * | Section, |
| FName | Key, | ||
| const FString & | Value, | ||
| const FString & | BranchName, | ||
| const FString & | LayerSubstring, | ||
| bool | bWriteFile | ||
| ) |
| bool FConfigCacheIni::AreFileOperationsDisabled | ( | ) |
Returns whether or not file operations are disabled
|
static |
Wipe all cached platform configs. Next ForPlatform call will load on-demand the platform configs
| 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
Create GConfig from a saved file
| void FConfigCacheIni::Detach | ( | const FString & | Filename | ) |
| void FConfigCacheIni::DisableFileOperations | ( | ) |
Disables any file IO by the config cache system
| 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
| Ar | the device to write to |
| IniName | An optional ini name to restrict the writing to (Engine or WrangleContent) - meant to be used with "final" .ini files (not Default*) |
| bool FConfigCacheIni::EmptySectionsMatchingString | ( | const TCHAR * | SectionString, |
| const FString & | Filename | ||
| ) |
| void FConfigCacheIni::EnableFileOperations | ( | ) |
Re-enables file IO by the config cache system
| void FConfigCacheIni::Exit | ( | ) |
| FConfigFile * FConfigCacheIni::Find | ( | const FString & | InFilename | ) |
Finds, loads, or creates the in-memory config file for a config cache filename.
| A | known key like GEngineIni, or the return value of GetConfigFilename |
| 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)
| FConfigBranch * FConfigCacheIni::FindBranchWithNoReload | ( | FName | BaseIniName, |
| const FString & | Filename | ||
| ) |
Same as FindBranch, but this will not reload a formerly SafeUnload'd branch
| FConfigFile * FConfigCacheIni::FindConfigFile | ( | const FString & | Filename | ) |
Finds the in-memory config file for a config cache filename.
| A | known key like GEngineIni, or the return value of GetConfigFilename |
| FConfigFile * FConfigCacheIni::FindConfigFileWithBaseName | ( | FName | BaseName | ) |
Finds Config file that matches the base name such as "Engine"
|
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.
| LocalFile | The output object to fill. If the FConfigFile is found in the cache, this won't be used. |
| IniName | Either a Base ini name (Engine) or a full ini name (WrangleContent). NO PATH OR EXTENSION SHOULD BE USED! |
| Platform | The platform to use for Base ini names, NULL means to use the current platform |
|
static |
Attempts to find the platform config in the cache.
| IniName | Either a Base ini name (Engine) or a full ini name (WrangleContent). NO PATH OR EXTENSION SHOULD BE USED! |
| Platform | The platform to use for Base ini names, NULL means to use the current platform |
| bool FConfigCacheIni::ForEachEntry | ( | const FKeyValueSink & | Visitor, |
| const TCHAR * | Section, | ||
| const FString & | Filename | ||
| ) |
allows to iterate through all key value pairs
|
static |
Retrieve the fully processed ini system for another platform. The editor will start loading these in the background on startup
| int32 FConfigCacheIni::GetArray | ( | const TCHAR * | Section, |
| const TCHAR * | Key, | ||
| TArray< FString > & | out_Arr, | ||
| const FString & | Filename | ||
| ) |
| bool FConfigCacheIni::GetBool | ( | const TCHAR * | Section, |
| const TCHAR * | Key, | ||
| bool & | Value, | ||
| const FString & | Filename | ||
| ) |
|
inline |
| bool FConfigCacheIni::GetColor | ( | const TCHAR * | Section, |
| const TCHAR * | Key, | ||
| FColor & | Value, | ||
| const FString & | Filename | ||
| ) |
| 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.
| IniBaseName | Base name of the .ini (Engine, Game, CustomSystem) |
Retrieve a list of all of the config files stored in the cache
| ConfigFilenames | Out array to receive the list of filenames |
|
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.
|
static |
Calculates the name of a dest (generated) .ini file for a given base (ie Engine, Game, etc)
| IniBaseName | Base name of the .ini (Engine, Game) |
| PlatformName | Name of the platform to get the .ini path for (nullptr means to use the current platform) |
| GeneratedConfigDir | The base folder that will contain the generated config files. |
| bool FConfigCacheIni::GetDouble | ( | const TCHAR * | Section, |
| const TCHAR * | Key, | ||
| double & | Value, | ||
| const FString & | Filename | ||
| ) |
| TArray< FString > FConfigCacheIni::GetFilenames | ( | ) |
| bool FConfigCacheIni::GetFloat | ( | const TCHAR * | Section, |
| const TCHAR * | Key, | ||
| float & | Value, | ||
| const FString & | Filename | ||
| ) |
|
inline |
| bool FConfigCacheIni::GetInt | ( | const TCHAR * | Section, |
| const TCHAR * | Key, | ||
| int32 & | Value, | ||
| const FString & | Filename | ||
| ) |
| bool FConfigCacheIni::GetInt64 | ( | const TCHAR * | Section, |
| const TCHAR * | Key, | ||
| int64 & | Value, | ||
| const FString & | Filename | ||
| ) |
|
inline |
| SIZE_T FConfigCacheIni::GetMaxMemoryUsage | ( | ) |
USed to get the max memory usage for the FConfigCacheIni
| 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.
| Filename | the file to retrieve section names from |
| SearchClass | the name of the PerObjectConfig class to retrieve sections for. |
| out_SectionNames | will receive the list of section names that correspond to PerObjectConfig sections of the specified class |
| MaxResults | the maximum number of section names to retrieve |
| bool FConfigCacheIni::GetRotator | ( | const TCHAR * | Section, |
| const TCHAR * | Key, | ||
| FRotator & | Value, | ||
| const FString & | Filename | ||
| ) |
| const FConfigSection * FConfigCacheIni::GetSection | ( | const TCHAR * | Section, |
| const bool | Force, | ||
| const FString & | Filename | ||
| ) |
| bool FConfigCacheIni::GetSection | ( | const TCHAR * | Section, |
| TArray< FString > & | Result, | ||
| const FString & | Filename | ||
| ) |
| bool FConfigCacheIni::GetSectionNames | ( | const FString & | Filename, |
| TArray< FString > & | out_SectionNames | ||
| ) |
Retrieve the names for all sections contained in the file specified by Filename
| Filename | the file to retrieve section names from |
| out_SectionNames | will receive the list of section names |
| int32 FConfigCacheIni::GetSingleLineArray | ( | const TCHAR * | Section, |
| const TCHAR * | Key, | ||
| TArray< FString > & | out_Arr, | ||
| const FString & | Filename | ||
| ) |
Loads a "delimited" list of strings
| 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
| 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 |
| const TSet< FString > * FConfigCacheIni::GetStagedGlobalConfigCache | ( | ) | const |
Returns the staged global config cache
| 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
| FString FConfigCacheIni::GetStr | ( | const TCHAR * | Section, |
| const TCHAR * | Key, | ||
| const FString & | Filename | ||
| ) |
| bool FConfigCacheIni::GetString | ( | const TCHAR * | Section, |
| const TCHAR * | Key, | ||
| FString & | Value, | ||
| const FString & | Filename | ||
| ) |
|
inline |
| bool FConfigCacheIni::GetText | ( | const TCHAR * | Section, |
| const TCHAR * | Key, | ||
| FText & | Value, | ||
| const FString & | Filename | ||
| ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| bool FConfigCacheIni::GetVector | ( | const TCHAR * | Section, |
| const TCHAR * | Key, | ||
| FVector & | Value, | ||
| const FString & | Filename | ||
| ) |
| bool FConfigCacheIni::GetVector2D | ( | const TCHAR * | Section, |
| const TCHAR * | Key, | ||
| FVector2D & | Value, | ||
| const FString & | Filename | ||
| ) |
| bool FConfigCacheIni::GetVector4 | ( | const TCHAR * | Section, |
| const TCHAR * | Key, | ||
| FVector4 & | Value, | ||
| const FString & | Filename | ||
| ) |
|
static |
Creates GConfig, loads the standard global ini files (Engine, Editor, etc), fills out GEngineIni, etc. and marks GConfig as ready for use
|
static |
Load the standard (used on all platforms) ini files, like Engine, Input, etc
| FConfigContext | The loading context that controls the destination of the loaded ini files |
return True if the engine ini was loaded
|
inline |
Return whether this is one of the global ConfigSystems: GConfig or FConfigCacheIni::ForPlatform.
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")
|
inline |
|
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.
|
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
| ConfigFile | The output object to fill |
| IniName | Either a Base ini name (Engine) or a full ini name (WrangleContent). NO PATH OR EXTENSION SHOULD BE USED! |
| EngineConfigDir | Engine config directory. |
| SourceConfigDir | Game config directory. |
| bIsBaseIniName | true if IniName is a Base name, which can be overridden on commandline, etc. |
| Platform | The platform to use for Base ini names |
| bForceReload | force 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 |
| bWriteDestIni | write out a destination ini file to the Saved folder, only valid if bIsBaseIniName is true |
| bAllowGeneratedIniWhenCooked | If true, the engine will attempt to load the generated/user INI file when loading cooked games |
| GeneratedConfigDir | The location where generated config files are made. |
| void FConfigCacheIni::LoadFile | ( | const FString & | InFilename, |
| const FConfigFile * | Fallback = NULL, |
||
| const TCHAR * | PlatformString = NULL |
||
| ) |
|
static |
Loads and generates a destination ini file and adds it to GConfig:
| FinalIniFilename | The output name of the generated .ini file (in Game\Saved\Config) |
| BaseIniName | The "base" ini name, with no extension (ie, Engine, Game, etc) |
| Platform | The platform to load the .ini for (if NULL, uses current) |
| bForceReload | If true, the destination .in will be regenerated from the source, otherwise this will only process if the dest isn't in GConfig |
| bRequireDefaultIni | If true, the Default*.ini file is required to exist when generating the final ini file. |
| bAllowGeneratedIniWhenCooked | If true, the engine will attempt to load the generated/user INI file when loading cooked games |
| GeneratedConfigDir | The location where generated config files are made. |
|
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
| ConfigFile | The output object to fill |
| IniName | Either a Base ini name (Engine) or a full ini name (WrangleContent). NO PATH OR EXTENSION SHOULD BE USED! |
| bIsBaseIniName | true if IniName is a Base name, which can be overridden on commandline, etc. |
| Platform | The platform to use for Base ini names, NULL means to use the current platform |
| bForceReload | force 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 |
|
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.
| NonNormalizedPath | The path to the INI file we want to access. |
| 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
| Section | Name of section to look in |
| KeyOne | Key to use for the 1 in the 1-to-N (MapName in the above example) |
| KeyN | Key to use for the N in the 1-to-N (Package in the above example) |
| OutMap | Map containing parsed results |
| Filename | Filename 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
| Section | Name of section to look in |
| KeyOne | Key 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) |
| KeyN | Key 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) |
| OutMap | Map containing parsed results |
| Filename | Filename 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
| 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
| Section | Name of section to look in |
| KeyOne | Key to use for the 1 in the 1-to-N (MapName in the above example) |
| KeyN | Key to use for the N in the 1-to-N (Package in the above example) |
| OutMap | Map containing parsed results |
| Filename | Filename 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
| Section | Name of section to look in |
| KeyOne | Key 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) |
| KeyN | Key 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) |
| OutMap | Map containing parsed results |
| Filename | Filename 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
|
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.
|
static |
Tell GConfig and the ForPlatform config systems about a plugin location
| int32 FConfigCacheIni::Remove | ( | const FString & | Filename | ) |
| 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)
| bool FConfigCacheIni::RemoveFromSectionOfStaticLayer | ( | const TCHAR * | Section, |
| FName | Key, | ||
| const FString & | Value, | ||
| const FString & | BranchName, | ||
| const FString & | LayerSubstring, | ||
| bool | bWriteFile | ||
| ) |
| bool FConfigCacheIni::RemoveKey | ( | const TCHAR * | Section, |
| const TCHAR * | Key, | ||
| const FString & | Filename | ||
| ) |
| 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
| bool FConfigCacheIni::RemoveKeyFromSectionOfStaticLayer | ( | const TCHAR * | Section, |
| FName | Key, | ||
| const FString & | BranchName, | ||
| const FString & | LayerSubstring, | ||
| bool | bWriteFile | ||
| ) |
|
static |
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!
|
static |
| 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
| bool FConfigCacheIni::ResetKeyInSectionOfStaticLayer | ( | const TCHAR * | Section, |
| FName | Key, | ||
| const FString & | BranchName, | ||
| const FString & | LayerSubstring, | ||
| bool | bWriteFile | ||
| ) |
Clears out the memory of a branch, but can reload it on demand if needed
Save the current config cache state into a file for bootstrapping other processes.
| void FConfigCacheIni::SetArray | ( | const TCHAR * | Section, |
| const TCHAR * | Key, | ||
| const TArray< FString > & | Value, | ||
| const FString & | Filename | ||
| ) |
| bool FConfigCacheIni::SetArrayInSectionOfStaticLayer | ( | const TCHAR * | Section, |
| FName | Key, | ||
| const TArray< FString > & | Values, | ||
| bool | bClearArray, | ||
| const FString & | BranchName, | ||
| const FString & | LayerSubstring, | ||
| bool | bWriteFile | ||
| ) |
| void FConfigCacheIni::SetBool | ( | const TCHAR * | Section, |
| const TCHAR * | Key, | ||
| bool | Value, | ||
| const FString & | Filename | ||
| ) |
| void FConfigCacheIni::SetColor | ( | const TCHAR * | Section, |
| const TCHAR * | Key, | ||
| FColor | Value, | ||
| const FString & | Filename | ||
| ) |
| void FConfigCacheIni::SetDouble | ( | const TCHAR * | Section, |
| const TCHAR * | Key, | ||
| double | Value, | ||
| const FString & | Filename | ||
| ) |
| void FConfigCacheIni::SetFile | ( | const FString & | InFilename, |
| const FConfigFile * | NewConfigFile | ||
| ) |
| void FConfigCacheIni::SetFloat | ( | const TCHAR * | Section, |
| const TCHAR * | Key, | ||
| float | Value, | ||
| const FString & | Filename | ||
| ) |
| 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)
| bool FConfigCacheIni::SetInSectionOfStaticLayer | ( | const TCHAR * | Section, |
| FName | Key, | ||
| const FString & | Value, | ||
| const FString & | BranchName, | ||
| const FString & | LayerSubstring, | ||
| bool | bWriteFile | ||
| ) |
| void FConfigCacheIni::SetInt | ( | const TCHAR * | Section, |
| const TCHAR * | Key, | ||
| int32 | Value, | ||
| const FString & | Filename | ||
| ) |
| void FConfigCacheIni::SetRotator | ( | const TCHAR * | Section, |
| const TCHAR * | Key, | ||
| FRotator | Value, | ||
| const FString & | Filename | ||
| ) |
| void FConfigCacheIni::SetSingleLineArray | ( | const TCHAR * | Section, |
| const TCHAR * | Key, | ||
| const TArray< FString > & | In_Arr, | ||
| const FString & | Filename | ||
| ) |
Saves a "delimited" list of strings
| 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
| 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 |
| void FConfigCacheIni::SetString | ( | const TCHAR * | Section, |
| const TCHAR * | Key, | ||
| const TCHAR * | Value, | ||
| const FString & | Filename | ||
| ) |
| void FConfigCacheIni::SetText | ( | const TCHAR * | Section, |
| const TCHAR * | Key, | ||
| const FText & | Value, | ||
| const FString & | Filename | ||
| ) |
| void FConfigCacheIni::SetVector | ( | const TCHAR * | Section, |
| const TCHAR * | Key, | ||
| FVector | Value, | ||
| const FString & | Filename | ||
| ) |
| void FConfigCacheIni::SetVector2D | ( | const TCHAR * | Section, |
| const TCHAR * | Key, | ||
| FVector2D | Value, | ||
| const FString & | Filename | ||
| ) |
| void FConfigCacheIni::SetVector4 | ( | const TCHAR * | Section, |
| const TCHAR * | Key, | ||
| const FVector4 & | Value, | ||
| const FString & | Filename | ||
| ) |
| void FConfigCacheIni::ShowMemoryUsage | ( | FOutputDevice & | Ar | ) |
Dumps memory stats for each file in the config cache to the specified archive.
| Ar | the output device to dump the results to |
| void FConfigCacheIni::UnloadFile | ( | const FString & | Filename | ) |