Also this is my current save&load code:
void ASpawnerParent::SaveInstances()
{
MakeSaveDirectory();
FBufferArchive ToFile;
ToFile << InstanceTransforms;
const FString& FullFilePath = SaveDirString + "/" + "PlantSpawner" +".save";
if(!FFileHelper::SaveArrayToFile(ToFile, * FullFilePath))
{
UE_LOG(LogTemp, Warning, TEXT("Failed to Save") );
return;
}
UE_LOG(LogTemp, Log, TEXT("Save Succesful") );
}
void ASpawnerParent::LoadInstances()
{
TArray<uint8> TheBinaryArray;
const FString& FullFilePath = SaveDirString + "/" + "PlantSpawner" +".save";
if(!FFileHelper::LoadFileToArray(TheBinaryArray, *FullFilePath))
{
UE_LOG(LogTemp, Warning, TEXT("Failed to Load") );
return;
}
FMemoryReader FromBinary = FMemoryReader(TheBinaryArray, true);
FromBinary.Seek(0);
FromBinary << InstanceTransforms;
UE_LOG(LogTemp, Log, TEXT("Load Succesful") );
}