How to store variables to a custom .ini file?

For writing to custom ini file, instead of using one of the globals as file name (GGameIni etc), you need to pass in your file’s absolute path. For instance, if I want to save data in an ini called DefaultMyGame.ini stored in [Project]/Config, I’ll use as path FPaths::ProjectConfigDir() / TEXT("DefaultMyGame.ini").

And for the section, it’s as others said: /Script/YourProjectName.ClassName
If it is a plugin, it’ll be /Script/ModuleName.ClassName

1 Like