You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Fix locations that include the headers to use the "Experimental" subfolder and re-sort includes. No functional change, purely a move, search+replace, and sort of includes. #rb matt.peters #preflight 63939eebc415e8dc78d35d63 [CL 23468934 by Zousar Shaker in ue5-main branch]
36 lines
1.1 KiB
C++
36 lines
1.1 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "ServiceInstanceManager.h"
|
|
#include "Experimental/ZenServerInterface.h"
|
|
|
|
|
|
namespace UE::Zen
|
|
{
|
|
|
|
TSharedPtr<FZenServiceInstance> FServiceInstanceManager::GetZenServiceInstance() const
|
|
{
|
|
UE::Zen::FZenLocalServiceRunContext RunContext;
|
|
if (UE::Zen::TryGetLocalServiceRunContext(RunContext))
|
|
{
|
|
uint16 LocalPort = 0;
|
|
if (UE::Zen::IsLocalServiceRunning(*RunContext.GetDataPath(), &LocalPort) && (LocalPort != 0))
|
|
{
|
|
if (LocalPort != CurrentPort)
|
|
{
|
|
CurrentPort = LocalPort;
|
|
UE::Zen::FServiceSettings ServiceSettings;
|
|
ServiceSettings.SettingsVariant.Emplace<UE::Zen::FServiceConnectSettings>();
|
|
UE::Zen::FServiceConnectSettings& ConnectExistingSettings = ServiceSettings.SettingsVariant.Get<UE::Zen::FServiceConnectSettings>();
|
|
ConnectExistingSettings.HostName = TEXT("localhost");
|
|
ConnectExistingSettings.Port = LocalPort;
|
|
CurrentInstance = MakeShared<FZenServiceInstance>(MoveTemp(ServiceSettings));
|
|
}
|
|
|
|
return CurrentInstance;
|
|
}
|
|
}
|
|
return nullptr;
|
|
}
|
|
|
|
} // namespace UE::Zen
|