I have a very annoying problem with file paths. If I use a full valid pathname to my project, reading files/assets are ok. But when I want SAVE anything, UE4 writes stuff to Saved/Cooked/WindowsNoEditor/projectname subfolder, despite I have been set absolute path. I used FPaths::GameDir and then ConvertRelativePathToFull. (checked, the result is ok)
This is true for write methods of FFileHelper and FPlatformFileManager. Last time I tried to make a folder with CreateDirectory, but that also created in mentioned cooked folder. If I use standard C++ methods for file write or folder creation, it works correctly, but I would use rather UE4 methods. It is the same with development or debug builds.
What I miss here?
Example:
FString foldername = FPaths::GameDir() + L"Savegames/";
foldername = FPaths::ConvertRelativePathToFull(foldername);
GameDir give back relative path, then I change it to absolute.
which looks now for example
…\Savegames
then after conversion I got F:\Spirits\Strategeist\Savegames, which is fine.
but despite this, FFileHelper.SaveStringToFile places the file to cooked/saved… folders.
also, creating a new directory with FPlatformFileManager::Get().GetPlatformFile().CreateDirectory() results the same, I got the new folder in Cooked/saved/WindowsNoEditor/projectname and seems UE4 ignores my absolute path.
Any suggestions?