My Savgame classes:
TitlesSaveGame.h
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/SaveGame.h"
#include "Skillz/Constructors/Titles.h"
#include "TitlesSaveGame.generated.h"
class UTitle;
UCLASS()
class UTitlesSaveGame : public USaveGame
{
GENERATED_BODY()
public:
UPROPERTY(VisibleAnywhere, Category = Basic)
TArray<TSubclassOf<UTitle>> AllTitles;
UPROPERTY(VisibleAnywhere, Category = Basic)
FCreatureStats Stats;
};
TitlesSaveGame.cpp is empty
The allready posted code is a mix of Titles.h and Titles.cpp.
Does it make a difference if i store the savegame instance instead of just storing the variables directly?