you can use this setup:
// MySettings.h - header file with custom settings, for ex: MyCustomString
#pragma once
#include "CoreMinimal.h"
#include "Engine/DeveloperSettings.h"
#include "MySettings.generated.h"
UCLASS(Config=MySettings)
class VR_GRAPHS_API UMySettings : public UDeveloperSettings
{
GENERATED_BODY()
public:
UPROPERTY(config, EditAnywhere)
FString MyCustomString;
};
later you can use this settings in your custom class:
#include "MySettings.h"
void USomeClass::UseSomeSettings()
{
const UMySettings* MySettings = GetDefault<UMySettings>();
StringFromSettings = MySettings->MyCustomString;
}
but keep in mind: after your project packaged there are no files with settings. Run it once and it will be appear: YourProject\YourProject\Saved\Config\WindowsNoEditor\MySettings.ini .
Also it will be empty and it will be use default value (if you set it in the editor or in UMySettings class or in YourSourceProject/Config/DefaultMySettings.ini), but user can easily add two lines in this file for override it:
[/Script/YourProject.MySettings]
MyCustomString="UserCustomString"