|
Live Config
|
#include <LiveConfigSystem.h>
Public Member Functions | |
| virtual void | Initialize (FSubsystemCollectionBase &Collection) override |
| virtual void | Deinitialize () override |
| virtual bool | ShouldCreateSubsystem (UObject *Outer) const override |
| void | SaveProperty (const FLiveConfigPropertyDefinition &PropertyDefinition) |
| void | SavePropertyDeferred (const FLiveConfigPropertyDefinition &PropertyDefinition) |
| void | RenameProperty (FLiveConfigProperty OldName, FLiveConfigProperty NewName, bool bCreateRedirector=false) |
| FString | GetStringValue (FLiveConfigProperty Key) const |
| float | GetFloatValue (FLiveConfigProperty Key) const |
| int32 | GetIntValue (FLiveConfigProperty Key) const |
| bool | GetBoolValue (FLiveConfigProperty Key) const |
| template<typename T > | |
| T | GetLiveConfigStruct (FLiveConfigProperty StructProperty) const |
| template<typename T > | |
| T | GetLiveConfigValue (FLiveConfigProperty Property) const |
| void | GetLiveConfigStruct_Internal (class UScriptStruct *Struct, void *OutStructPtr, FLiveConfigProperty Prefix) const |
| bool | IsDataReady () const |
| void | DownloadConfig () |
| void | RebuildConfigCache () |
| void | RebuildConfigCache (const FLiveConfigProfile &Profile) |
| const TMap< FLiveConfigProperty, FLiveConfigPropertyDefinition > & | GetAllProperties () const |
| void | RedirectPropertyName (FLiveConfigProperty &Property) const |
| void | RemoveRedirect (FName OldPropertyName) |
| void | HandleTagsChanged () |
Static Public Member Functions | |
| static ULiveConfigSystem & | Get () |
| static bool | DoesPropertyNameExist (FLiveConfigProperty PropertyName) |
Public Attributes | |
| FOnLiveConfigPropertiesUpdated | OnPropertiesUpdated |
| FSimpleMulticastDelegate | OnTagsChanged |
| TMap< FLiveConfigProperty, FLiveConfigPropertyDefinition > | PropertyDefinitions |
| TArray< FName > | PropertyTags |
| TMap< FName, FName > | PropertyRedirects |
A subsystem to download configuration data from a public Google Sheet URL (published as CSV). It populates a TMap which can be queried for string, float, or int values.
|
static |
note - if using this very early during startup (eg from another UEngineSubsystem::Initialize) consider using GEngine->GetEngineSubsystem<ULiveConfigSystem>() to check
| const TMap< FLiveConfigProperty, FLiveConfigPropertyDefinition > & ULiveConfigSystem::GetAllProperties | ( | ) | const |
Get all available row names (public for editor access)
| bool ULiveConfigSystem::GetBoolValue | ( | FLiveConfigProperty | Key | ) | const |
Gets a configuration value as a boolean.
| float ULiveConfigSystem::GetFloatValue | ( | FLiveConfigProperty | Key | ) | const |
Gets a configuration value as a float.
| int32 ULiveConfigSystem::GetIntValue | ( | FLiveConfigProperty | Key | ) | const |
Gets a configuration value as an integer.
|
inline |
Look up values for a struct's properties using the property name as a prefix for its members. Each UProperty in the struct will be looked up as StructProperty.PropertyName.
|
inline |
| T | Must be a numeric type, bool, or string. Does NOT support structs |
| Property | Property key to lookup - may be implicitly converted |
| FString ULiveConfigSystem::GetStringValue | ( | FLiveConfigProperty | Key | ) | const |
Gets a configuration value as a string.
| Key | The CVar-like name to look up. |
|
inline |
Returns true if the data has been successfully downloaded and parsed.
| void ULiveConfigSystem::RebuildConfigCache | ( | ) |
Refresh properties from editor settings
| void ULiveConfigSystem::RedirectPropertyName | ( | FLiveConfigProperty & | Property | ) | const |
Redirects a property name based on the redirectors map
| void ULiveConfigSystem::RemoveRedirect | ( | FName | OldPropertyName | ) |
Removes a specific redirect from the map and saves the config
| OldPropertyName | The old property name to remove from redirects |
| void ULiveConfigSystem::RenameProperty | ( | FLiveConfigProperty | OldName, |
| FLiveConfigProperty | NewName, | ||
| bool | bCreateRedirector = false |
||
| ) |
Renames an existing property and its associated files on disk. If the property is a struct, it will also rename all its members.
| OldName | Current name of the property |
| NewName | New name for the property |
| bCreateRedirector | Whether to create a redirector from the old name to the new name |
| void ULiveConfigSystem::SaveProperty | ( | const FLiveConfigPropertyDefinition & | PropertyDefinition | ) |
| PropertyDefinition | Property to be added or updated. Will be saved to file |
| void ULiveConfigSystem::SavePropertyDeferred | ( | const FLiveConfigPropertyDefinition & | PropertyDefinition | ) |
Like @SaveProperty, but don't rebuild the cache right away