Saved games in packaged builds

Its the damndest thing. Before packaging a build i go to the saved folder and delete save records from the save game folder. However, when i package the game, its showing variables updated instead of default values. For example, i have 100 as the game start health and magic var. They are showing as if they were increased from pickups from a saved game. Is there anywhere that saves would be kept that could influence a fresh build?

If you package as shipping the saved game files will be in the Appdata folder
you could open it by typing in search %appdata%
then find your game name folder open it and delete the save game

1 Like

You can use the below code to see if you have any loadable files:

TArray<FString> FileNames;

FString Directory = FPaths::ProjectSavedDir();

//Get all files in SaveGames
IPlatformFile &PlatformFile = FPlatformFileManager::Get().GetPlatformFile();
FLocalTimestampDirectoryVisitor Visitor(PlatformFile, TArray<FString>(), TArray<FString>(), false);    
PlatformFile.IterateDirectory(*Directory, Visitor);


//Get paths of all files in SaveGames
TArray<FString> files;
Visitor.FileTimes.GetKeys(files);

You may also want to just comb through all your load game nodes- which you hopefully only have a few of at max. This is easy to do if you press Ctrl+F, search load game from slot, and then press the find in all blueprints icon:


You can then simply add print nodes to see if you load anything.

1 Like

It was local to my test device! I really thought uninstalling would remove that stuff but thanks for the shedding light on this!!