Storing a generated level

I generate my level in my game mode in the

virtual void InitGame(const FString& MapName, const FString& Options, FString& ErrorMessage)

call. This works fine, except I would ideally like to be able to actually save it (it doesn’t change, it is just as bore to create it manually). Is there a way I can do this? Either by saving it once made, or is there some way of having Unreal execute some code without being in simulation?

#Read Write any Data to Binary File

I have a tutorial that shows you how to read write any data you want to binary files

A new, community-hosted Unreal Engine Wiki - Announcements - Unreal Engine Forums,Read%26_Write_Any_Data_to_Compressed_Binary_Files

You can store literally any info you want !

and then read it back into UE4 !


Sadly this is not what I am looking for, I would like to be able to save out the level and load it in the editor. I.e. if I have to write a custom serialiser as your tutorial described, I would first have to work out exactly how the file is laid out in the .umap format.

As an aside, in your tutorial you say an FString can be stored in 16 bytes. Since a FString can be of arbitrary length, I don’t think this can be right.