Saving a game with multiple levels
Hello, I'm trying to create a save/load system for my game. I have seen multiple tutorials online, but none of them help when it comes to saving the game with multiple levels. Here is an example of what I want to achieve: -If the player saves the game on Scene 1, I want him to be able to load that scene from another level and from the main menu using a load save widget. Can anybody help please?
asked Mar 21 '19 at 04:56 PM in Using UE4
For something like this, you would want the save game functionality be accessible by any map, so the GameInstance would be the best place to Save / Load since it remains persistent throughout your game. I would recommend you storing your level specific information in a struct and store it as a map in your save game object.
You will obviously modify the structs so it contains whichever data you would like. Note, because I used a map, this means you will only be able to save one set of data per level. If you want to have multiple saves per level you will have to modify the way the data is saved and how it is accessed.
I hope this helps. I quickly rushed this on my lunch break without testing, so if this code doesn't work directly, it will at least give you an idea of what we are trying to achieve.
Good luck :).
answered Mar 22 '19 at 02:00 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here