2022-05-23 18:41:30 +00:00
|
|
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
|
|
|
|
#include "LyraUserFacingExperienceDefinition.h"
|
2022-09-13 07:18:28 +00:00
|
|
|
|
2022-05-23 18:41:30 +00:00
|
|
|
#include "CommonSessionSubsystem.h"
|
2022-09-13 07:18:28 +00:00
|
|
|
#include "Containers/UnrealString.h"
|
|
|
|
#include "UObject/NameTypes.h"
|
2022-05-23 18:41:30 +00:00
|
|
|
|
|
|
|
UCommonSession_HostSessionRequest* ULyraUserFacingExperienceDefinition::CreateHostingRequest() const
|
|
|
|
{
|
|
|
|
const FString ExperienceName = ExperienceID.PrimaryAssetName.ToString();
|
|
|
|
const FString UserFacingExperienceName = GetPrimaryAssetId().PrimaryAssetName.ToString();
|
|
|
|
UCommonSession_HostSessionRequest* Result = NewObject<UCommonSession_HostSessionRequest>();
|
|
|
|
Result->OnlineMode = ECommonSessionOnlineMode::Online;
|
|
|
|
Result->bUseLobbies = true;
|
|
|
|
Result->MapID = MapID;
|
|
|
|
Result->ModeNameForAdvertisement = UserFacingExperienceName;
|
|
|
|
Result->ExtraArgs = ExtraArgs;
|
|
|
|
Result->ExtraArgs.Add(TEXT("Experience"), ExperienceName);
|
|
|
|
Result->MaxPlayerCount = MaxPlayerCount;
|
|
|
|
|
|
|
|
if (bRecordReplay)
|
|
|
|
{
|
|
|
|
Result->ExtraArgs.Add(TEXT("DemoRec"), FString());
|
|
|
|
}
|
|
|
|
|
|
|
|
return Result;
|
|
|
|
}
|