Save
void AMyPlayerState::OnQuestSaveDirty()
{
if (!QuestComp->GetOwner()->HasAuthority())
{
return;
}
const FQuestSaveData Data = QuestComp->GetSaveData();
// Write Data into your USaveGame
}
void AMyGameMode::HandlePlayerLoaded(APlayerState* PS, const FQuestSaveData& Data)
{
if (UQuestComponent* QC = PS->FindComponentByClass<UQuestComponent>())
{
QC->LoadSaveData(Data);
}
}
LoadSaveData on a non-authority machine is ignored.
Build the tracker and log on the HUD page for this mix.
The sample project stores FQuestSaveData in UQESaveGame. That class is sample code. It is not part of the plugin.