Live Config
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
ULiveConfigSystem Class Reference

#include <LiveConfigSystem.h>

Inheritance diagram for ULiveConfigSystem:

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 >
GetLiveConfigStruct (FLiveConfigProperty StructProperty) const
 
template<typename 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 ULiveConfigSystemGet ()
 
static bool DoesPropertyNameExist (FLiveConfigProperty PropertyName)
 

Public Attributes

FOnLiveConfigPropertiesUpdated OnPropertiesUpdated
 
FSimpleMulticastDelegate OnTagsChanged
 
TMap< FLiveConfigProperty, FLiveConfigPropertyDefinitionPropertyDefinitions
 
TArray< FName > PropertyTags
 
TMap< FName, FName > PropertyRedirects
 

Detailed Description

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.

Member Function Documentation

◆ Get()

ULiveConfigSystem & ULiveConfigSystem::Get ( )
static

note - if using this very early during startup (eg from another UEngineSubsystem::Initialize) consider using GEngine->GetEngineSubsystem<ULiveConfigSystem>() to check

Returns
Checked reference to the live config engine subsystem

◆ GetAllProperties()

const TMap< FLiveConfigProperty, FLiveConfigPropertyDefinition > & ULiveConfigSystem::GetAllProperties ( ) const

Get all available row names (public for editor access)

◆ GetBoolValue()

bool ULiveConfigSystem::GetBoolValue ( FLiveConfigProperty  Key) const

Gets a configuration value as a boolean.

◆ GetFloatValue()

float ULiveConfigSystem::GetFloatValue ( FLiveConfigProperty  Key) const

Gets a configuration value as a float.

◆ GetIntValue()

int32 ULiveConfigSystem::GetIntValue ( FLiveConfigProperty  Key) const

Gets a configuration value as an integer.

◆ GetLiveConfigStruct()

template<typename T >
T ULiveConfigSystem::GetLiveConfigStruct ( FLiveConfigProperty  StructProperty) const
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.

◆ GetLiveConfigValue()

template<typename T >
T ULiveConfigSystem::GetLiveConfigValue ( FLiveConfigProperty  Property) const
inline
Template Parameters
TMust be a numeric type, bool, or string. Does NOT support structs
Parameters
PropertyProperty key to lookup - may be implicitly converted

◆ GetStringValue()

FString ULiveConfigSystem::GetStringValue ( FLiveConfigProperty  Key) const

Gets a configuration value as a string.

Parameters
KeyThe CVar-like name to look up.
Returns
The found value or the default from property definition.

◆ IsDataReady()

bool ULiveConfigSystem::IsDataReady ( ) const
inline

Returns true if the data has been successfully downloaded and parsed.

◆ RebuildConfigCache()

void ULiveConfigSystem::RebuildConfigCache ( )

Refresh properties from editor settings

◆ RedirectPropertyName()

void ULiveConfigSystem::RedirectPropertyName ( FLiveConfigProperty Property) const

Redirects a property name based on the redirectors map

◆ RemoveRedirect()

void ULiveConfigSystem::RemoveRedirect ( FName  OldPropertyName)

Removes a specific redirect from the map and saves the config

Parameters
OldPropertyNameThe old property name to remove from redirects

◆ RenameProperty()

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.

Parameters
OldNameCurrent name of the property
NewNameNew name for the property
bCreateRedirectorWhether to create a redirector from the old name to the new name

◆ SaveProperty()

void ULiveConfigSystem::SaveProperty ( const FLiveConfigPropertyDefinition PropertyDefinition)
Parameters
PropertyDefinitionProperty to be added or updated. Will be saved to file

◆ SavePropertyDeferred()

void ULiveConfigSystem::SavePropertyDeferred ( const FLiveConfigPropertyDefinition PropertyDefinition)

Like @SaveProperty, but don't rebuild the cache right away


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