mirror of
https://github.com/Ed94/Cog.git
synced 2026-08-03 14:18:46 +00:00
improve netimgui auto connection
This commit is contained in:
@@ -8,7 +8,6 @@
|
|||||||
#include "Engine/EngineBaseTypes.h"
|
#include "Engine/EngineBaseTypes.h"
|
||||||
#include "Engine/World.h"
|
#include "Engine/World.h"
|
||||||
#include "imgui.h"
|
#include "imgui.h"
|
||||||
#include "imgui_internal.h"
|
|
||||||
#include "Misc/CoreMisc.h"
|
#include "Misc/CoreMisc.h"
|
||||||
#include "NetImgui_Api.h"
|
#include "NetImgui_Api.h"
|
||||||
|
|
||||||
@@ -48,7 +47,7 @@ void FCogEngineWindow_NetImgui::Initialize()
|
|||||||
|
|
||||||
FCogWindowConsoleCommandManager::RegisterWorldConsoleCommand(
|
FCogWindowConsoleCommandManager::RegisterWorldConsoleCommand(
|
||||||
TEXT("Cog.NetImgui.RunServer"),
|
TEXT("Cog.NetImgui.RunServer"),
|
||||||
TEXT("Run NetImgui server"),
|
TEXT("Run NetImgui server application"),
|
||||||
GetWorld(),
|
GetWorld(),
|
||||||
FCogWindowConsoleCommandDelegate::CreateLambda([this](const TArray<FString>& InArgs, UWorld* InWorld)
|
FCogWindowConsoleCommandDelegate::CreateLambda([this](const TArray<FString>& InArgs, UWorld* InWorld)
|
||||||
{
|
{
|
||||||
@@ -57,7 +56,7 @@ void FCogEngineWindow_NetImgui::Initialize()
|
|||||||
|
|
||||||
FCogWindowConsoleCommandManager::RegisterWorldConsoleCommand(
|
FCogWindowConsoleCommandManager::RegisterWorldConsoleCommand(
|
||||||
TEXT("Cog.NetImgui.CloseServer"),
|
TEXT("Cog.NetImgui.CloseServer"),
|
||||||
TEXT("Close NetImgui server"),
|
TEXT("Close NetImgui server application"),
|
||||||
GetWorld(),
|
GetWorld(),
|
||||||
FCogWindowConsoleCommandDelegate::CreateLambda([this](const TArray<FString>& InArgs, UWorld* InWorld)
|
FCogWindowConsoleCommandDelegate::CreateLambda([this](const TArray<FString>& InArgs, UWorld* InWorld)
|
||||||
{
|
{
|
||||||
@@ -97,32 +96,34 @@ void FCogEngineWindow_NetImgui::RenderTick(float DeltaTime)
|
|||||||
// Before auto connecting, wait for NetImgui startup,
|
// Before auto connecting, wait for NetImgui startup,
|
||||||
// which require imgui context to be initialized
|
// which require imgui context to be initialized
|
||||||
//------------------------------------------------------
|
//------------------------------------------------------
|
||||||
if (HasAlreadyTriedToConnect == false && FCogImguiContext::GetIsNetImguiInitialized())
|
|
||||||
|
if (HasStartedAutoConnection == false && FCogImguiContext::GetIsNetImguiInitialized())
|
||||||
{
|
{
|
||||||
const ENetMode NetMode = GetWorld()->GetNetMode();
|
HasStartedAutoConnection = true;
|
||||||
const bool ShouldConnect = (Config->AutoConnectOnDedicatedServer && NetMode == NM_DedicatedServer)
|
|
||||||
|| (Config->AutoConnectOnListenServer && NetMode == NM_ListenServer)
|
|
||||||
|| (Config->AutoConnectOnClient && NetMode == NM_Client)
|
|
||||||
|| (Config->AutoConnectOnStandalone && NetMode == NM_Standalone);
|
|
||||||
|
|
||||||
if (ShouldConnect)
|
if (Config->AutoRunServer && GetWorld()->IsPlayInEditor())
|
||||||
{
|
|
||||||
if (Config->AutoRunServer)
|
|
||||||
{
|
|
||||||
ConnectTo();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ConnectFrom();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Config->AutoRunServer)
|
|
||||||
{
|
{
|
||||||
RunServer();
|
RunServer();
|
||||||
}
|
}
|
||||||
|
|
||||||
HasAlreadyTriedToConnect = true;
|
ECogNetImguiAutoConnectionMode AutoConnectMode = ECogNetImguiAutoConnectionMode::NoAutoConnect;
|
||||||
|
switch (GetWorld()->GetNetMode())
|
||||||
|
{
|
||||||
|
case NM_Client: AutoConnectMode = Config->AutoConnectOnClient; break;
|
||||||
|
case NM_ListenServer: AutoConnectMode = Config->AutoConnectOnListenServer; break;
|
||||||
|
case NM_Standalone: AutoConnectMode = Config->AutoConnectOnStandalone; break;
|
||||||
|
case NM_DedicatedServer: AutoConnectMode = Config->AutoConnectOnDedicatedServer; break;
|
||||||
|
default: AutoConnectMode = ECogNetImguiAutoConnectionMode::NoAutoConnect;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (AutoConnectMode == ECogNetImguiAutoConnectionMode::AutoListen)
|
||||||
|
{
|
||||||
|
ConnectFrom();
|
||||||
|
}
|
||||||
|
else if (AutoConnectMode == ECogNetImguiAutoConnectionMode::AutoConnect)
|
||||||
|
{
|
||||||
|
ConnectTo();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -138,15 +139,15 @@ void FCogEngineWindow_NetImgui::RenderContent()
|
|||||||
//----------------------------------------
|
//----------------------------------------
|
||||||
if (NetImgui::IsConnected())
|
if (NetImgui::IsConnected())
|
||||||
{
|
{
|
||||||
ImGui::TextUnformatted("Status: Connected");
|
ImGui::TextColored(ImVec4(0.5f, 1.0f, 0.6f, 1.0f), "Connected");
|
||||||
}
|
}
|
||||||
else if (NetImgui::IsConnectionPending())
|
else if (NetImgui::IsConnectionPending())
|
||||||
{
|
{
|
||||||
ImGui::TextUnformatted("Status: Waiting Server");
|
ImGui::TextColored(ImVec4(0.7f, 0.7f, 0.7f, 1.0f), "Waiting Server");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ImGui::TextUnformatted("Status: Not Connected");
|
ImGui::TextColored(ImVec4(1.0f, 0.4f, 0.3f, 1.0f), "Not Connected");
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------
|
//----------------------------------------
|
||||||
@@ -172,19 +173,13 @@ void FCogEngineWindow_NetImgui::RenderContent()
|
|||||||
{
|
{
|
||||||
ConnectTo();
|
ConnectTo();
|
||||||
}
|
}
|
||||||
if (ImGui::IsItemHovered())
|
ImGui::SetItemTooltip("Attempt a connection to a remote netImgui server at the provided address.");
|
||||||
{
|
|
||||||
ImGui::SetTooltip("Attempt a connection to a remote netImgui server at the provided address.");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ImGui::Button("Listen", ImVec2(ImGui::GetContentRegionAvail().x, 0)))
|
if (ImGui::Button("Listen", ImVec2(ImGui::GetContentRegionAvail().x, 0)))
|
||||||
{
|
{
|
||||||
ConnectFrom();
|
ConnectFrom();
|
||||||
}
|
}
|
||||||
if (ImGui::IsItemHovered())
|
ImGui::SetItemTooltip("Start listening for a connection request by a remote netImgui server, on the provided Port.");
|
||||||
{
|
|
||||||
ImGui::SetTooltip("Start listening for a connection request by a remote netImgui server, on the provided Port.");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------
|
//----------------------------------------
|
||||||
@@ -203,113 +198,92 @@ void FCogEngineWindow_NetImgui::RenderContent()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (ImGui::Button("Run Server", ImVec2(ImGui::GetContentRegionAvail().x, 0)))
|
if (NetImgui::IsConnected() == false)
|
||||||
{
|
{
|
||||||
RunServer();
|
if (ImGui::Button("Run Server", ImVec2(ImGui::GetContentRegionAvail().x, 0)))
|
||||||
}
|
{
|
||||||
if (ImGui::IsItemHovered())
|
RunServer();
|
||||||
{
|
}
|
||||||
ImGui::SetTooltip("Run the NetImgui server executable.");
|
if (ImGui::IsItemHovered())
|
||||||
|
{
|
||||||
|
ImGui::SetTooltip("Run the NetImgui server executable.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ImGui::Spacing();
|
||||||
|
|
||||||
//----------------------------------------
|
//----------------------------------------
|
||||||
// Settings
|
// Settings
|
||||||
//----------------------------------------
|
//----------------------------------------
|
||||||
if (ImGui::CollapsingHeader("Settings", ImGuiTreeNodeFlags_DefaultOpen))
|
if (ImGui::CollapsingHeader("Settings"))
|
||||||
{
|
{
|
||||||
|
ImGui::SeparatorText("Connection");
|
||||||
|
|
||||||
FCogWindowWidgets::SetNextItemToShortWidth();
|
FCogWindowWidgets::SetNextItemToShortWidth();
|
||||||
FCogWindowWidgets::InputText("Server Address", Config->ServerAddress);
|
FCogWindowWidgets::InputText("Server Address", Config->ServerAddress);
|
||||||
if (ImGui::IsItemHovered())
|
ImGui::SetItemTooltip("NetImgui server application address.");
|
||||||
{
|
|
||||||
ImGui::SetTooltip("NetImgui server application address.");
|
|
||||||
}
|
|
||||||
|
|
||||||
FCogWindowWidgets::SetNextItemToShortWidth();
|
FCogWindowWidgets::SetNextItemToShortWidth();
|
||||||
ImGui::InputInt("Server Port", &Config->ServerPort);
|
ImGui::InputInt("Server Port", &Config->ServerPort);
|
||||||
if (ImGui::IsItemHovered())
|
ImGui::SetItemTooltip("Port of the NetImgui Server application to connect to.");
|
||||||
{
|
|
||||||
ImGui::SetTooltip("Port of the NetImgui Server application to connect to.");
|
|
||||||
}
|
|
||||||
|
|
||||||
FCogWindowWidgets::SetNextItemToShortWidth();
|
FCogWindowWidgets::SetNextItemToShortWidth();
|
||||||
FCogWindowWidgets::InputText("Client Name", Config->ClientName);
|
FCogWindowWidgets::InputText("Client Name", Config->ClientName);
|
||||||
if (ImGui::IsItemHovered())
|
ImGui::SetItemTooltip("Client name displayed in the server's clients list.");
|
||||||
{
|
|
||||||
ImGui::SetTooltip("Client name displayed in the server's clients list.");
|
|
||||||
}
|
|
||||||
|
|
||||||
FCogWindowWidgets::SetNextItemToShortWidth();
|
FCogWindowWidgets::SetNextItemToShortWidth();
|
||||||
ImGui::InputInt("Client Port", &Config->ClientPort);
|
ImGui::InputInt("Client Port", &Config->ClientPort);
|
||||||
if (ImGui::IsItemHovered())
|
ImGui::SetItemTooltip("Port this client should wait for connection from server application.");
|
||||||
{
|
|
||||||
ImGui::SetTooltip("Port this client should wait for connection from server application.");
|
|
||||||
}
|
|
||||||
|
|
||||||
ImGui::Checkbox("Auto Connect on Dedicated Server", &Config->AutoConnectOnDedicatedServer);
|
ImGui::SeparatorText("Auto-Connect");
|
||||||
if (ImGui::IsItemHovered())
|
|
||||||
{
|
|
||||||
ImGui::SetTooltip("Automatically connect to the NetImgui server when launching on dedicated server mode.");
|
|
||||||
}
|
|
||||||
|
|
||||||
ImGui::Checkbox("Auto Connect on Listen Server", &Config->AutoConnectOnListenServer);
|
FCogWindowWidgets::SetNextItemToShortWidth();
|
||||||
if (ImGui::IsItemHovered())
|
FCogWindowWidgets::ComboboxEnum("Dedicated Server", Config->AutoConnectOnDedicatedServer);
|
||||||
{
|
ImGui::SetItemTooltip("Auto-connect mode to the NetImgui server when launching on dedicated server mode.");
|
||||||
ImGui::SetTooltip("Automatically connect to the NetImgui server when launching on listen server mode.");
|
|
||||||
}
|
|
||||||
|
|
||||||
ImGui::Checkbox("Auto Connect on Client", &Config->AutoConnectOnClient);
|
FCogWindowWidgets::SetNextItemToShortWidth();
|
||||||
if (ImGui::IsItemHovered())
|
FCogWindowWidgets::ComboboxEnum("Listen Server", Config->AutoConnectOnListenServer);
|
||||||
{
|
ImGui::SetItemTooltip("Auto-connect mode to the NetImgui server when launching on listen server mode.");
|
||||||
ImGui::SetTooltip("Automatically connect to the NetImgui server when launching on client mode.");
|
|
||||||
}
|
|
||||||
|
|
||||||
ImGui::Checkbox("Auto Connect on Standalone", &Config->AutoConnectOnStandalone);
|
FCogWindowWidgets::SetNextItemToShortWidth();
|
||||||
if (ImGui::IsItemHovered())
|
FCogWindowWidgets::ComboboxEnum("Client", Config->AutoConnectOnClient);
|
||||||
{
|
ImGui::SetItemTooltip("Auto-connect mode to the NetImgui server when launching on client mode.");
|
||||||
ImGui::SetTooltip("Automatically connect to the NetImgui server when launching on standlone mode.");
|
|
||||||
}
|
FCogWindowWidgets::SetNextItemToShortWidth();
|
||||||
|
FCogWindowWidgets::ComboboxEnum("Standalone", Config->AutoConnectOnStandalone);
|
||||||
|
ImGui::SetItemTooltip("Auto-connect mode to the NetImgui server when launching on standalone mode.");
|
||||||
|
|
||||||
|
ImGui::SeparatorText("Server App");
|
||||||
|
|
||||||
ImGui::Checkbox("Auto Run Server", &Config->AutoRunServer);
|
ImGui::Checkbox("Auto Run Server", &Config->AutoRunServer);
|
||||||
if (ImGui::IsItemHovered())
|
ImGui::SetItemTooltip("Automatically run the NetImgui server executable at startup.");
|
||||||
{
|
|
||||||
ImGui::SetTooltip("Automatically run the NetImgui server executable at startup.");
|
|
||||||
}
|
|
||||||
|
|
||||||
FCogWindowWidgets::SetNextItemToShortWidth();
|
FCogWindowWidgets::SetNextItemToShortWidth();
|
||||||
FCogWindowWidgets::InputText("Server Exe Path", Config->ServerExePath);
|
FCogWindowWidgets::InputText("Server Executable", Config->ServerExecutable);
|
||||||
if (ImGui::IsItemHovered())
|
ImGui::SetItemTooltip("Filename of the NetImgui server executable.");
|
||||||
{
|
|
||||||
ImGui::SetTooltip("Path to NetImgui server executable path. Used to automatically run the NetImgui server executable.");
|
|
||||||
}
|
|
||||||
|
|
||||||
FCogWindowWidgets::SetNextItemToShortWidth();
|
FCogWindowWidgets::SetNextItemToShortWidth();
|
||||||
FCogWindowWidgets::InputText("Server Exe Args", Config->ServerExeArgs);
|
FCogWindowWidgets::InputText("Server Directory", Config->ServerDirectory);
|
||||||
if (ImGui::IsItemHovered())
|
ImGui::SetItemTooltip("Directory of the NetImgui server executable.");
|
||||||
{
|
|
||||||
ImGui::SetTooltip("Argument used when launching the NetImgui server executable.");
|
FCogWindowWidgets::SetNextItemToShortWidth();
|
||||||
}
|
FCogWindowWidgets::InputText("Server Arguments", Config->ServerArguments);
|
||||||
|
ImGui::SetItemTooltip("Argument used when launching the NetImgui server executable.");
|
||||||
}
|
}
|
||||||
#endif // #if NETIMGUI_ENABLED
|
#endif // #if NETIMGUI_ENABLED
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------------------------------
|
||||||
FString FCogEngineWindow_NetImgui::GetClientName()
|
FString FCogEngineWindow_NetImgui::GetClientName() const
|
||||||
{
|
{
|
||||||
switch (GetWorld()->GetNetMode())
|
switch (GetWorld()->GetNetMode())
|
||||||
{
|
{
|
||||||
case NM_Standalone:
|
case NM_Standalone: return FString::Printf(TEXT("%s_%s"), *Config->ClientName, TEXT("Standalone"));
|
||||||
return FString::Printf(TEXT("%s_%s"), *Config->ClientName, TEXT("Standalone"));
|
case NM_DedicatedServer: return FString::Printf(TEXT("%s_%s"), *Config->ClientName, TEXT("DedicatedServer"));
|
||||||
|
case NM_ListenServer: return FString::Printf(TEXT("%s_%s"), *Config->ClientName, TEXT("ListenServer"));
|
||||||
case NM_DedicatedServer:
|
case NM_Client: return FString::Printf(TEXT("%s_%s"), *Config->ClientName, TEXT("Client"));
|
||||||
return FString::Printf(TEXT("%s_%s"), *Config->ClientName, TEXT("DedicatedServer"));
|
default:;
|
||||||
|
|
||||||
case NM_ListenServer:
|
|
||||||
return FString::Printf(TEXT("%s_%s"), *Config->ClientName, TEXT("ListenServer"));
|
|
||||||
|
|
||||||
case NM_Client:
|
|
||||||
return FString::Printf(TEXT("%s_%s"), *Config->ClientName, TEXT("Client"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return Config->ClientName;
|
return Config->ClientName;
|
||||||
@@ -363,23 +337,28 @@ void FCogEngineWindow_NetImgui::RunServer()
|
|||||||
{
|
{
|
||||||
if (FPlatformProcess::IsProcRunning(ServerProcess))
|
if (FPlatformProcess::IsProcRunning(ServerProcess))
|
||||||
{
|
{
|
||||||
|
UE_LOG(LogCogImGui, Verbose, TEXT("FCogEngineWindow_NetImgui::RunServer | Already running"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Config->ServerExePath.IsEmpty())
|
const FString ServerPath = FPaths::Combine(Config->ServerDirectory, Config->ServerExecutable);
|
||||||
|
if (IPlatformFile::GetPlatformPhysical().FileExists(*ServerPath) == false)
|
||||||
{
|
{
|
||||||
|
UE_LOG(LogCogImGui, Verbose, TEXT("FCogEngineWindow_NetImgui::RunServer | Invalid Server Path:%s"), *ServerPath);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
UE_LOG(LogCogImGui, Verbose, TEXT("FCogEngineWindow_NetImgui::RunServer | Server Path:%s"), *ServerPath);
|
||||||
|
|
||||||
ServerProcess = FPlatformProcess::CreateProc(
|
ServerProcess = FPlatformProcess::CreateProc(
|
||||||
*Config->ServerExePath,
|
*ServerPath,
|
||||||
*Config->ServerExeArgs,
|
*Config->ServerArguments,
|
||||||
true,
|
false,
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
nullptr,
|
nullptr,
|
||||||
0,
|
0,
|
||||||
nullptr,
|
*Config->ServerDirectory,
|
||||||
nullptr
|
nullptr
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -392,10 +371,7 @@ void FCogEngineWindow_NetImgui::CloseServer()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Config->ServerExePath.IsEmpty() == false)
|
FPlatformProcess::TerminateProc(ServerProcess);
|
||||||
{
|
|
||||||
FPlatformProcess::TerminateProc(ServerProcess);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------------------------------
|
||||||
@@ -409,15 +385,16 @@ void UCogEngineWindowConfig_NetImgui::Reset()
|
|||||||
|
|
||||||
ClientName = FString("Cog");
|
ClientName = FString("Cog");
|
||||||
ClientPort = NetImgui::kDefaultClientPort;
|
ClientPort = NetImgui::kDefaultClientPort;
|
||||||
AutoConnectOnDedicatedServer = true;
|
AutoConnectOnDedicatedServer = ECogNetImguiAutoConnectionMode::AutoConnect;
|
||||||
AutoConnectOnListenServer = false;
|
AutoConnectOnListenServer = ECogNetImguiAutoConnectionMode::NoAutoConnect;
|
||||||
AutoConnectOnClient = false;
|
AutoConnectOnClient = ECogNetImguiAutoConnectionMode::NoAutoConnect;
|
||||||
AutoConnectOnStandalone = false;
|
AutoConnectOnStandalone = ECogNetImguiAutoConnectionMode::NoAutoConnect;
|
||||||
|
|
||||||
ServerAddress = FString("127.0.0.1");
|
ServerAddress = FString("127.0.0.1");
|
||||||
ServerPort = NetImgui::kDefaultServerPort;
|
ServerPort = NetImgui::kDefaultServerPort;
|
||||||
ServerExePath = FString("C:\\NetImgui\\Server_Exe\\NetImguiServer.exe");
|
ServerDirectory = FString("C:\\NetImgui\\Server_Exe");
|
||||||
ServerExeArgs = FString("");
|
ServerExecutable = FString("NetImguiServer.exe");
|
||||||
|
ServerArguments = FString("");
|
||||||
AutoRunServer = false;
|
AutoRunServer = false;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -7,6 +7,14 @@
|
|||||||
|
|
||||||
class UCogEngineWindowConfig_NetImgui;
|
class UCogEngineWindowConfig_NetImgui;
|
||||||
|
|
||||||
|
UENUM()
|
||||||
|
enum class ECogNetImguiAutoConnectionMode : uint8
|
||||||
|
{
|
||||||
|
NoAutoConnect,
|
||||||
|
AutoConnect,
|
||||||
|
AutoListen,
|
||||||
|
};
|
||||||
|
|
||||||
class COGENGINE_API FCogEngineWindow_NetImgui : public FCogWindow
|
class COGENGINE_API FCogEngineWindow_NetImgui : public FCogWindow
|
||||||
{
|
{
|
||||||
typedef FCogWindow Super;
|
typedef FCogWindow Super;
|
||||||
@@ -41,11 +49,11 @@ protected:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
FString GetClientName();
|
FString GetClientName() const;
|
||||||
|
|
||||||
TObjectPtr<UCogEngineWindowConfig_NetImgui> Config = nullptr;
|
TObjectPtr<UCogEngineWindowConfig_NetImgui> Config = nullptr;
|
||||||
|
|
||||||
bool HasAlreadyTriedToConnect = false;
|
bool HasStartedAutoConnection = false;
|
||||||
|
|
||||||
FProcHandle ServerProcess;
|
FProcHandle ServerProcess;
|
||||||
};
|
};
|
||||||
@@ -67,16 +75,16 @@ public:
|
|||||||
int32 ClientPort = 8889;
|
int32 ClientPort = 8889;
|
||||||
|
|
||||||
UPROPERTY(Config)
|
UPROPERTY(Config)
|
||||||
bool AutoConnectOnDedicatedServer = true;
|
ECogNetImguiAutoConnectionMode AutoConnectOnDedicatedServer = ECogNetImguiAutoConnectionMode::AutoConnect;
|
||||||
|
|
||||||
UPROPERTY(Config)
|
UPROPERTY(Config)
|
||||||
bool AutoConnectOnListenServer = false;
|
ECogNetImguiAutoConnectionMode AutoConnectOnListenServer = ECogNetImguiAutoConnectionMode::NoAutoConnect;
|
||||||
|
|
||||||
UPROPERTY(Config)
|
UPROPERTY(Config)
|
||||||
bool AutoConnectOnClient = false;
|
ECogNetImguiAutoConnectionMode AutoConnectOnClient = ECogNetImguiAutoConnectionMode::NoAutoConnect;
|
||||||
|
|
||||||
UPROPERTY(Config)
|
UPROPERTY(Config)
|
||||||
bool AutoConnectOnStandalone = false;
|
ECogNetImguiAutoConnectionMode AutoConnectOnStandalone = ECogNetImguiAutoConnectionMode::NoAutoConnect;
|
||||||
|
|
||||||
UPROPERTY(Config)
|
UPROPERTY(Config)
|
||||||
FString ServerAddress = FString("127.0.0.1");
|
FString ServerAddress = FString("127.0.0.1");
|
||||||
@@ -85,10 +93,13 @@ public:
|
|||||||
int32 ServerPort = 8888;
|
int32 ServerPort = 8888;
|
||||||
|
|
||||||
UPROPERTY(Config)
|
UPROPERTY(Config)
|
||||||
FString ServerExePath = FString("C:\\NetImgui\\Server_Exe\\NetImguiServer.exe");
|
FString ServerDirectory = FString("C:\\NetImgui\\Server_Exe");
|
||||||
|
|
||||||
UPROPERTY(Config)
|
UPROPERTY(Config)
|
||||||
FString ServerExeArgs = FString("");
|
FString ServerExecutable = FString("NetImguiServer.exe");
|
||||||
|
|
||||||
|
UPROPERTY(Config)
|
||||||
|
FString ServerArguments = FString("");
|
||||||
|
|
||||||
UPROPERTY(Config)
|
UPROPERTY(Config)
|
||||||
bool AutoRunServer = false;
|
bool AutoRunServer = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user