I practically copied the USaveGameC from the tutorial so they are not marked as SaveGame. Not sure if they get serialised though. (see below)
UCLASS(Blueprintable)
class SAVINGTEST_API USaveGameC : public USaveGame
{
GENERATED_BODY()
public:
UPROPERTY(EditAnywhere, BlueprintReadWrite)
TArray<uint8> MasteObjectSave;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
TArray<uint8> GIData;
// All object data in one array
UPROPERTY(EditAnywhere, BlueprintReadWrite)
TArray<FObjectRecord> ObjectRecords;
// used for temp loading objects before serializing but after loading
UPROPERTY(EditAnywhere, BlueprintReadWrite)
TArray<UObject*> TempObjects;
// outers that are part of the map or otherwise preloaded so won't be in the list of TempObjects
UPROPERTY(EditAnywhere, BlueprintReadWrite)
TArray<UObject*> PersistentOuters;
// functions
}
Regarding the TArray I was keeping it in the blueprint that extends the USaveGameC
cpp implementation. In all honesty, I would have preferred to keep everything in C++ but the tutorial has a blueprint section so I replicated it in the same way. I do think it’s pretty messy so after getting a working example I was going to port it back to C++.
I still haven’t had a chance to try what you said. I got rudely interrupted by a meeting!
Will report back soon.
Cheers!