Hi, I am creating custom project settings following How to add custom settings in Project Settings? - Programming & Scripting / C++ - Epic Developer Community Forums (unrealengine.com)
I want to access the value of those settings from reading ini configs so I followed How get Project Settings values? - Development / Programming & Scripting - Epic Developer Community Forums (unrealengine.com). However, I run into problem with the function
GConfig->GetString( const TCHAR* Section, const TCHAR* Key, FString& Value, const FString& Filename );
// sample usage, where GGameIni is a built-in variable that stores the path to Game.ini
FString AppVersion;
GConfig->GetString(
TEXT("/Script/EngineSettings.GeneralProjectSettings"),
TEXT("ProjectVersion"),
AppVersion,
GGameIni
);
When used with built-in project settings, it works fine, as the ‘Filename’ param can get auto determined(like GGameIni for ‘Config/DefaultGame.ini’). However, I dont know how to get the ‘Filename’ param if I declared a custom configName in UCLASS() specifier.
For example:
UCLASS(config = MySetting)
class TESTPLUGIN_API UTestPlugin_Settings : public UObject
{
GENERATED_BODY()
public:
...
}
it stores configs in DefaultMySettings.ini, which cannot get from a built-in variable like GGameIni.
Does anyone know how to determine the Filename param for that function?