So we have recently decided to upgrade the current release of the game to the 4.8 Engine version from 4.5 and found that when we try to load our previous saves from 4.5 it crashes. There is a comment in the LoadGameFromSlot(…) function which mentions that there may be crashes;
“if you get a crash loading a pre-4.8 version of your savegame file and
you don’t want to delete it, try uncommenting these lines and changing them to use the version
information from your previous build. Then load and resave your savegame file.”
We have changed the memory reader information to the version we were using by changing the variables to:
MemoryReader.SetUE4Ver(451); // @see GPackageFileUE4Version
const FString brachName = “++depot+UE4-Releases+4.5”
MemoryReader.SetEngineVer(FEngineVersion(4, 5, 1, 0, brachName); // @see GEngineVersion
but this doesn’t seem to help. After looking further into the code, it seems that because whenever the serialization code tries to load a custom struct from my save, the position it was looking at in the memory archive bytes was off by what seems like 16.
Am I missing something with setting the UE4/EngineVer incorrectly that means that it doesn’t serialize my save correctly?