While most of the classes we have built so far have been based on the actor class, there are some functionalities that are not supported by the actor class and saving the data is one of those.
In order to make a class that can be used as an instance to manage the game save and load, you'll need to create a class based on the SaveGame
class.
I have created mine for Bellz, and named it BellzSaveGame
. Choose a name that suits you and just create it. Once the Visual Studio opens, go ahead and open the Bellz.h
file or, in other words, the main header for your game (your game might not be named Bellz).
Within the header file Bellz.h
, we will be including some extra header files in order to be able to use the save functionality within any class instance. We will be including:
BellzSaveGame.h
Kismet/GameplayStatics.h
But make sure that the new header files are added under the Engine.h
file, otherwise you'll get an error.
__ //I replaced the EngineMinimal.h, in order to get...