Let’s create a save system in Unreal Engine 4

BlueBubbleBee
10 min readApr 28, 2021

Save and load your game in UE4 using C++ and Blueprints

In this tutorial, we take a look at how we can create a save system for our games.
You can also watch the video tutorial here: https://youtu.be/5r9TTyCi55I

Download the project files here:
https://drive.google.com/file/d/17SjnYitfeVqp8MutlIAJsqazERJ91323/view?usp=sharing

The MainMenu map and MainMenuGameMode

The first thing we will do is create this main menu to start a new game or continue with an existing one.

This simple main menu is created in an empty map called MainMenu with its own Game Mode BP_MainMenuGameMode, which extends from MainMenuGameMode C++ class.

This new game mode, creates and initializes the widget Main Menu

The blueprint event OnShowMainMenu is called Begin Play, and it will tell us if it’s a new game or not.
On the header of MainMenuGameMode, we have a reference to the GameInstance created for this tutorial and the blueprint event:

The game instance UHowToGameInstance contains functions to load and save an existing save file and it’s the perfect place for this type of operations, as the game instance is available on every map and it’s persistent.

On BeginPlay, we retrieve the GameInstance, and we call the function IsNewGame, which…

--

--

BlueBubbleBee

I am Bee, an indie developer making Kitori Academy a cosy life sim where you take the role of a wizard apprentice and have a cat as a companion!