Block quick launch for launching the game for partitioned world if cook on fly or cook by the book in editor are used.

#jira UE-113672
#rb jeanfrancois.dube
#lockdown simon.tourangeau

#ROBOMERGE-SOURCE: CL 16049916 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v789-15992632)

[CL 16049996 by richard malo in ue5-main branch]
This commit is contained in:
richard malo
2021-04-19 08:51:38 -04:00
parent d73a076897
commit 3238315d60

View File

@@ -215,6 +215,24 @@ void UEditorEngine::StartPlayUsingLauncherSession(FRequestPlaySessionParams& InR
CurrentLauncherCookMode = ELauncherProfileCookModes::OnTheFly;
bIncrimentalCooking = false;
}
if (CurrentLauncherCookMode == ELauncherProfileCookModes::OnTheFlyInEditor ||
CurrentLauncherCookMode == ELauncherProfileCookModes::OnTheFly ||
CurrentLauncherCookMode == ELauncherProfileCookModes::ByTheBookInEditor)
{
// For now World Partition doesn't these cook modes
FWorldContext& EditorContext = GetEditorWorldContext();
if (EditorContext.World()->GetWorldPartition())
{
FString ErrorMsg = FString::Printf(TEXT("Error launching map %s : Quick launch %s doesn't yet support partitioned worlds."), *EditorContext.World()->GetOutermost()->GetName(), (CurrentLauncherCookMode == ELauncherProfileCookModes::ByTheBookInEditor) ? TEXT("cook by the book") : TEXT("cook on the fly"));
UE_LOG(LogPlayLevel, Error, TEXT("%s"), *ErrorMsg);
FMessageLog("EditorErrors").Error(FText::FromString(ErrorMsg));
FMessageLog("EditorErrors").Open();
CancelRequestPlaySession();
return;
}
}
LauncherProfile->SetCookMode(CurrentLauncherCookMode);
LauncherProfile->SetUnversionedCooking(!bIncrimentalCooking);
LauncherProfile->SetIncrementalCooking(bIncrimentalCooking);