Why does SaveGameToSlot not work after installing Perforce (including p4ignore)?


Earlier yesterday I wrapped up some complex functionality and decided it was time to set up Perforce for my project. After spending a while getting various elements figured out, I successfully set a p4ignore which excludes ‘Saved’, ‘Build’, ‘Binaries’, et cetera. I confirmed that it works using the ‘p4 ignores’ command and confirmed that those folders weren’t being sent to the depot.

Now, when I try to play-in-editor, the Game Instance cannot get past a very basic element in its Initiate script - saving my ‘required’ file (list of usernames). Does anyone know why this would be an issue after successfully having Perforce / Helix ignore the folders mentioned above?

Thank you.

I was not able to find a solution, but I found a workaround. The SaveGames needed to be created after the project folder was associated with a workspace / depot on the Perforce server.

A little bit of testing showed that I could still create and delete SaveGames as long as they weren’t the ones that existed when I set up the workspace. So, I reloaded a new folder from my 7z backup that I created before I started implementing Perforce (cannot recommend this highly enough), and then simply set Event Init in the Game Instance to delete each SaveGame I had. After there were no SaveGames in the project, I created a new Depot (just to be safe) via P4A, then I deleted the old workspace, and set up a new one (again, in a different folder from the old one). After confirming that the p4ignore was set up successfully, I marked all files for add and added them. I then reloaded the project in the Unreal editor and viola, my generic Event Init was able to create, load, and save the basic file that I needed.

So there is some issue with saving SaveGames (deleting also didn’t work, although loading did) in a Perforce workspace, even though the Depot does not contain the ‘Saved’ folder, and is set to ignore all .sav and Saved folder contents…