Download

Is there a simple way to save and load a level?

Everything online is either about saving variables or creating checkpoints and loading from them. Is there any simple way to simply save the level at event begin play and then turn the game off and load that level when you play again? There are no clear tutorials about this anywhere online. Even in the market place where an easy save and load BP is for sale that unbelievably doesn’t even save and load levels. Why is this so difficult?

To save a level, you will essentially need to loop through each eligible/desired actor, save it’s class and transform, and a few other things. To load the level, simple spawn actors based on the classes and transforms you saved.

Ok so when you say actor I’m guessing you mean the main character. I don’t want to save anything else just the level so I don’t care about variables or anything else. When you say save its class what is “it” and what “Class” do I need to save and what do I transform? I won’t ask about the few other things because I’m guessing you mean states that I don’t care about saving like where an object or mesh might have been changed.

Well, if you only need to save the character’s location, and nothing else, then you can just save that into the SaveGame object, and then set the player’s location when loading it.