Saving and loading

I’m sorry it took me so long to write back. Thanks for your answer first of all!

I ended up realising, that in my case I don’t need to save a lot of different actors. I just ended up saving all of my items and when loading first destroying all of the items in the level and spawn them in again.

Most likely I’m not using an ideal solution here, since I just let USaveGame do everything for me. I derived from USaveGame, gave it a few structs for items, the player and doors (Those are pointed to by buttons, thus I decided not to destroy them but just save the necessary variables and the names of the actors since I don’t spawn in new doors at runtime [Yet]) and then used the following functions to save and reload everything (As explained here: https://docs.unrealengine.com/latest/INT/Gameplay/SaveGame/Code/index.html):

UGameplayStatics::CreateSaveGameObject
UGameplayStatics::SaveGameToSlot
UGameplayStatics::LoadGameFromSlot

I figured it would be good to have something working first of all. I guess serializing the actors would be more efficient harddrive-space-wise, but I think for the moment this works just fine. :slight_smile: