Dear Friends at Epic (and Josh),
As per Josh’s response in this thread:
https://rocket.unrealengine.com/questions/16734/getting-my-documents-or-appdata-path.html
I added this to my commandline:
-SaveToUserDir
#Loading Data From Config
I have been saving and loading data from config files, particularly game.ini, which are stored in:
GameDir/Saved/Windows/Config
my code below no longer works, the config file is not found, when I use -SaveToUserDir
if(GConfig)
GConfig->GetString(
*VictoryGameConfigCoreSection,
TEXT("RootDir"),
VictoryMainDirectoryName,
GGameIni
);
//Set a Default Name
//dir/windowsnoeditor/VictoryGame/saved/windowsnoeditor/config/game.ini
if(VictoryMainDirectoryName == "")
{
GConfig->SetString (
*VictoryGameConfigCoreSection,
TEXT("RootDir"),
TEXT("E:\\SameDir_As_ShortCut_Is_To_RunGame"),
GGameIni
);
}
else Optimize(VictoryMainDirectoryName);
Optimize("~~~~~~~~~~~~~~");
Optimize("Root Dir:");
Optimize(VictoryMainDirectoryName);
Optimize("~~~~~~~~~~~~~~\n");
#Summary
Why would useing -SaveToUserDir
cause this code to fail?
if(GConfig)
GConfig->GetString(
*VictoryGameConfigCoreSection,
TEXT("RootDir"),
VictoryMainDirectoryName,
GGameIni
);
#Idea
It would seem that the config system is internally changing its implementation to somehow look at the user’s documents folder for config files instead?
I have no idea how to override that behavior
Rama