Hi,
I’m working on save system and I’m wondering what is a good method to apply savegame state when savegame doesn’t belong to current level - you have change level before applying savegame.
For now I’ve implemented something like this:
- Get a level name from savegame
- Deserialize a savegame state, TArray with actor records
- Create a URL with saved level name and option for example: “?LoadedFromCheckpoint”
- Call ClientTravel with created URL
- Then in GameEngine class wait for PostLoadMap() function call
- Check in PostLoadMap if URL contain “?LoadedFromCheckpoint” option then load a savestate
Sometimes I can’t match serialized data with actors in the world because there are leftovers from the previous map.
Can sameone describe how to load a savegame correctly? Maybe I should enforce GC somewhere in the code or load a savegame from different event/function?
Regards
Pierdek