Add Editor Preference to control server selection
This commit is contained in:
@@ -11,3 +11,7 @@ SaveOnCompile=SoC_SuccessOnly
|
|||||||
RestoreOpenAssetTabsOnRestart=AlwaysRestore
|
RestoreOpenAssetTabsOnRestart=AlwaysRestore
|
||||||
|
|
||||||
AutoSaveWarningInSeconds=0
|
AutoSaveWarningInSeconds=0
|
||||||
|
|
||||||
|
[/Script/Integration.lxProjectSettings]
|
||||||
|
ActiveServer=/Game/Luprex/KnownServers/SS_Localhost.SS_Localhost
|
||||||
|
|
||||||
|
|||||||
BIN
Content/Luprex/KnownServers/SS_Josh_Primary.uasset
LFS
Normal file
BIN
Content/Luprex/KnownServers/SS_Josh_Primary.uasset
LFS
Normal file
Binary file not shown.
BIN
Content/Luprex/KnownServers/SS_Josh_Secondary.uasset
LFS
Normal file
BIN
Content/Luprex/KnownServers/SS_Josh_Secondary.uasset
LFS
Normal file
Binary file not shown.
BIN
Content/Luprex/KnownServers/SS_Localhost.uasset
LFS
Normal file
BIN
Content/Luprex/KnownServers/SS_Localhost.uasset
LFS
Normal file
Binary file not shown.
BIN
Content/Luprex/KnownServers/SS_Standalone.uasset
LFS
Normal file
BIN
Content/Luprex/KnownServers/SS_Standalone.uasset
LFS
Normal file
Binary file not shown.
@@ -72,22 +72,48 @@
|
|||||||
},
|
},
|
||||||
"tasks": {
|
"tasks": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"tasks": {
|
"tasks": [
|
||||||
"for-each" : [
|
{
|
||||||
{ "CMD" : "python3 build.py c++", "DEFAULT":true },
|
"label": "python3 build.py c++",
|
||||||
{ "CMD" : "python3 build.py all", "DEFAULT":false },
|
"group": { "kind": "build", "isDefault": true },
|
||||||
{ "CMD" : "python3 build.py clean", "DEFAULT":false }
|
"command": "python3 build.py c++",
|
||||||
],
|
"presentation": { "clear": true },
|
||||||
"body" : {
|
"problemMatcher": [
|
||||||
"label": "[CMD]",
|
{
|
||||||
"group": {
|
"owner": "build-integration",
|
||||||
"kind": "build",
|
"source": "build.py",
|
||||||
"isDefault": "[DEFAULT]"
|
"fileLocation": ["relative", "${workspaceFolder}"],
|
||||||
},
|
"pattern": {
|
||||||
"command": "[CMD]",
|
"regexp": "^(.*):(\\d+):(\\d+):\\s+(?:fatal\\s+)?(warning|error):\\s+(.*)$",
|
||||||
"presentation": {
|
"file": 1, "line": 2, "column": 3, "severity": 4, "message": 5
|
||||||
"clear": true
|
}
|
||||||
},
|
}
|
||||||
|
],
|
||||||
|
"type": "shell"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "python3 build.py all",
|
||||||
|
"group": { "kind": "build", "isDefault": false },
|
||||||
|
"command": "python3 build.py all",
|
||||||
|
"presentation": { "clear": true },
|
||||||
|
"problemMatcher": [
|
||||||
|
{
|
||||||
|
"owner": "build-integration",
|
||||||
|
"source": "build.py",
|
||||||
|
"fileLocation": ["relative", "${workspaceFolder}"],
|
||||||
|
"pattern": {
|
||||||
|
"regexp": "^(.*):(\\d+):(\\d+):\\s+(?:fatal\\s+)?(warning|error):\\s+(.*)$",
|
||||||
|
"file": 1, "line": 2, "column": 3, "severity": 4, "message": 5
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "shell"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "python3 build.py clean",
|
||||||
|
"group": { "kind": "build", "isDefault": false },
|
||||||
|
"command": "python3 build.py clean",
|
||||||
|
"presentation": { "clear": true },
|
||||||
"problemMatcher": [
|
"problemMatcher": [
|
||||||
{
|
{
|
||||||
"owner": "build-integration",
|
"owner": "build-integration",
|
||||||
@@ -101,78 +127,67 @@
|
|||||||
],
|
],
|
||||||
"type": "shell"
|
"type": "shell"
|
||||||
}
|
}
|
||||||
}
|
]
|
||||||
},
|
},
|
||||||
"launch": {
|
"launch": {
|
||||||
"version": "0.2.0",
|
"version": "0.2.0",
|
||||||
"configurations": {
|
"configurations": [
|
||||||
"append1" : {
|
{
|
||||||
"for-each": [
|
"name": "UnrealEditor",
|
||||||
{ "SERVER" : "Standalone" },
|
"request": "launch",
|
||||||
{ "SERVER" : "LocalHost" },
|
"program": "[UNREALENGINE]/Engine/Binaries/Linux/UnrealEditor-Linux-[DEBUG]",
|
||||||
{ "SERVER" : "192.168.1.155" },
|
"preLaunchTask": "python3 build.py c++",
|
||||||
{ "SERVER" : "192.168.1.156" }
|
"args": [
|
||||||
|
"[INTEGRATION]/Integration.uproject",
|
||||||
|
"-userdir=User/[USER]"
|
||||||
],
|
],
|
||||||
"body": {
|
"cwd": "[INTEGRATION]",
|
||||||
"name": "Server=[SERVER]",
|
"type": "lldb",
|
||||||
"request": "launch",
|
"console": "integratedTerminal",
|
||||||
"program": "[UNREALENGINE]/Engine/Binaries/Linux/UnrealEditor-Linux-[DEBUG]",
|
"initCommands": [
|
||||||
"preLaunchTask": "python3 build.py c++",
|
"command script import [INTEGRATION]/tools/UEDataFormatter.py",
|
||||||
"args": [
|
"settings set target.inline-breakpoint-strategy always",
|
||||||
"[INTEGRATION]/Integration.uproject",
|
"settings set target.prefer-dynamic-value no-run-target",
|
||||||
"-userdir=User/[USER]",
|
"process handle SIGTRAP --notify false --pass false --stop false",
|
||||||
"-LuprexServer=[SERVER]"
|
"target stop-hook add --one-liner \"p FUnixPlatformMisc::UngrabAllInput()\""
|
||||||
],
|
]
|
||||||
"cwd": "[INTEGRATION]",
|
|
||||||
"type": "lldb",
|
|
||||||
"console": "integratedTerminal",
|
|
||||||
"initCommands": [
|
|
||||||
"command script import [INTEGRATION]/tools/UEDataFormatter.py",
|
|
||||||
"settings set target.inline-breakpoint-strategy always",
|
|
||||||
"settings set target.prefer-dynamic-value no-run-target",
|
|
||||||
"process handle SIGTRAP --notify false --pass false --stop false",
|
|
||||||
"target stop-hook add --one-liner \"p FUnixPlatformMisc::UngrabAllInput()\""
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"append2" : [
|
{
|
||||||
{
|
"name": "UEWingman Commandlet",
|
||||||
"name": "UEWingman Commandlet",
|
"request": "launch",
|
||||||
"request": "launch",
|
"program": "[UNREALENGINE]/Engine/Binaries/Linux/UnrealEditor-Linux-[DEBUG]-Cmd",
|
||||||
"program": "[UNREALENGINE]/Engine/Binaries/Linux/UnrealEditor-Linux-[DEBUG]-Cmd",
|
"preLaunchTask": "python3 build.py c++",
|
||||||
"preLaunchTask": "python3 build.py c++",
|
"args": [
|
||||||
"args": [
|
"[INTEGRATION]/Integration.uproject",
|
||||||
"[INTEGRATION]/Integration.uproject",
|
"-userdir=User/[USER]",
|
||||||
"-userdir=User/[USER]",
|
"-run=UEWingman",
|
||||||
"-run=UEWingman",
|
"-unattended"
|
||||||
"-unattended"
|
],
|
||||||
],
|
"cwd": "[INTEGRATION]",
|
||||||
"cwd": "[INTEGRATION]",
|
"type": "lldb",
|
||||||
"type": "lldb",
|
"console": "integratedTerminal",
|
||||||
"console": "integratedTerminal",
|
"initCommands": [
|
||||||
"initCommands": [
|
"command script import [INTEGRATION]/tools/UEDataFormatter.py",
|
||||||
"command script import [INTEGRATION]/tools/UEDataFormatter.py",
|
"settings set target.inline-breakpoint-strategy always",
|
||||||
"settings set target.inline-breakpoint-strategy always",
|
"settings set target.prefer-dynamic-value no-run-target",
|
||||||
"settings set target.prefer-dynamic-value no-run-target",
|
"process handle SIGTRAP --notify false --pass false --stop false"
|
||||||
"process handle SIGTRAP --notify false --pass false --stop false"
|
]
|
||||||
]
|
},
|
||||||
},
|
{
|
||||||
{
|
"name": "Luprex Server",
|
||||||
"name": "Luprex Server",
|
"request": "launch",
|
||||||
"request": "launch",
|
"program": "[INTEGRATION]/luprex/build/[OS]/luprexstatic",
|
||||||
"program": "[INTEGRATION]/luprex/build/[OS]/luprexstatic",
|
"preLaunchTask": "python3 build.py c++",
|
||||||
"preLaunchTask": "python3 build.py c++",
|
"args": [ "lpxserver" ],
|
||||||
"args": [ "lpxserver" ],
|
"cwd": "[INTEGRATION]/luprex",
|
||||||
"cwd": "[INTEGRATION]/luprex",
|
"type": "lldb",
|
||||||
"type": "lldb",
|
"console": "integratedTerminal",
|
||||||
"console": "integratedTerminal",
|
"initCommands": [
|
||||||
"initCommands": [
|
"settings set target.inline-breakpoint-strategy always",
|
||||||
"settings set target.inline-breakpoint-strategy always",
|
"settings set target.prefer-dynamic-value no-run-target",
|
||||||
"settings set target.prefer-dynamic-value no-run-target",
|
"process handle SIGTRAP --notify false --pass false --stop false"
|
||||||
"process handle SIGTRAP --notify false --pass false --stop false"
|
]
|
||||||
]
|
}
|
||||||
}
|
]
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,9 +5,9 @@
|
|||||||
// When an error message gets written to UE_LOG, we can
|
// When an error message gets written to UE_LOG, we can
|
||||||
// optionally trigger the blueprint debugger.
|
// optionally trigger the blueprint debugger.
|
||||||
//
|
//
|
||||||
// This only affects UE_LOG messages that are generated
|
// This only affects UE_LOG messages that are generated by
|
||||||
// during blueprint execution. Log messages from other
|
// the blueprint thread, during blueprint execution. Log
|
||||||
// threads do not trigger the debugger.
|
// messages from other threads do not trigger the debugger.
|
||||||
//
|
//
|
||||||
// The following explains how we trigger the blueprint
|
// The following explains how we trigger the blueprint
|
||||||
// debugger on UE_LOG messages. Log messages are sent to a
|
// debugger on UE_LOG messages. Log messages are sent to a
|
||||||
|
|||||||
@@ -23,10 +23,6 @@
|
|||||||
//
|
//
|
||||||
// FInputDeviceTrackerProcessor
|
// FInputDeviceTrackerProcessor
|
||||||
//
|
//
|
||||||
// Slate input preprocessor. Updates the device-class
|
|
||||||
// static on each button-down event. Never consumes
|
|
||||||
// events (always returns false).
|
|
||||||
//
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
class FInputDeviceTrackerProcessor : public IInputProcessor
|
class FInputDeviceTrackerProcessor : public IInputProcessor
|
||||||
|
|||||||
@@ -19,7 +19,8 @@ public class Integration : ModuleRules
|
|||||||
"Networking",
|
"Networking",
|
||||||
"EnhancedInput",
|
"EnhancedInput",
|
||||||
"UMG",
|
"UMG",
|
||||||
"RenderCore"
|
"RenderCore",
|
||||||
|
"DeveloperSettings"
|
||||||
});
|
});
|
||||||
|
|
||||||
PrivateDependencyModuleNames.AddRange(new string[] {
|
PrivateDependencyModuleNames.AddRange(new string[] {
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
#include "Blueprint/WidgetBlueprintLibrary.h"
|
#include "Blueprint/WidgetBlueprintLibrary.h"
|
||||||
#include "Kismet/GameplayStatics.h"
|
#include "Kismet/GameplayStatics.h"
|
||||||
#include "Engine/GameInstance.h"
|
#include "Engine/GameInstance.h"
|
||||||
|
#include "ProjectSettings.h"
|
||||||
|
|
||||||
#include "Common.h"
|
#include "Common.h"
|
||||||
#include "AnimQueue.h"
|
#include "AnimQueue.h"
|
||||||
@@ -214,14 +215,13 @@ void ALuprexGameModeBase::InitializeGlobalState()
|
|||||||
|
|
||||||
// Possibly tell the engine to connect to a server.
|
// Possibly tell the engine to connect to a server.
|
||||||
if (Playing) {
|
if (Playing) {
|
||||||
FString LuprexServer;
|
UlxServerSelection* Server = GetDefault<UlxProjectSettings>()->ActiveServer.LoadSynchronous();
|
||||||
FParse::Value(FCommandLine::Get(), TEXT("-LuprexServer="), LuprexServer);
|
if (Server) {
|
||||||
LuprexServer = LuprexServer.ToLower();
|
FString Host = Server->Host.TrimStartAndEnd();
|
||||||
UE_LOG(LogTemp, Display, TEXT("LuprexServer = %s"), *LuprexServer)
|
if (!Host.IsEmpty()) {
|
||||||
if (LuprexServer != TEXT("standalone"))
|
FTCHARToUTF8 utf8server(*Server->Host);
|
||||||
{
|
w->play_access(w.Get(), AccessKind::CONNECT_TO_SERVER, 0, utf8server.Length(), utf8server.Get(), nullptr, nullptr);
|
||||||
FTCHARToUTF8 utf8server(LuprexServer);
|
}
|
||||||
w->play_access(w.Get(), AccessKind::CONNECT_TO_SERVER, 0, utf8server.Length(), utf8server.Get(), nullptr, nullptr);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
1
Source/Integration/ProjectSettings.cpp
Normal file
1
Source/Integration/ProjectSettings.cpp
Normal file
@@ -0,0 +1 @@
|
|||||||
|
#include "ProjectSettings.h"
|
||||||
34
Source/Integration/ProjectSettings.h
Normal file
34
Source/Integration/ProjectSettings.h
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "CoreMinimal.h"
|
||||||
|
#include "Engine/DataAsset.h"
|
||||||
|
#include "Engine/DeveloperSettings.h"
|
||||||
|
#include "ProjectSettings.generated.h"
|
||||||
|
|
||||||
|
UCLASS(BlueprintType)
|
||||||
|
class INTEGRATION_API UlxServerSelection : public UPrimaryDataAsset
|
||||||
|
{
|
||||||
|
GENERATED_BODY()
|
||||||
|
|
||||||
|
public:
|
||||||
|
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category="Server")
|
||||||
|
FString Description;
|
||||||
|
|
||||||
|
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category="Server")
|
||||||
|
FString Host;
|
||||||
|
};
|
||||||
|
|
||||||
|
UCLASS(Config=EditorPerProjectUserSettings, DefaultConfig, meta=(DisplayName="Server Settings"))
|
||||||
|
class INTEGRATION_API UlxProjectSettings : public UDeveloperSettings
|
||||||
|
{
|
||||||
|
GENERATED_BODY()
|
||||||
|
|
||||||
|
public:
|
||||||
|
virtual FName GetContainerName() const override { return TEXT("Editor"); }
|
||||||
|
virtual FName GetCategoryName() const override { return TEXT("Luprex"); }
|
||||||
|
virtual FName GetSectionName() const override { return TEXT("Server"); }
|
||||||
|
|
||||||
|
UPROPERTY(Config, EditAnywhere, BlueprintReadOnly, Category="Server",
|
||||||
|
meta=(AllowedClasses="/Script/Integration.lxServerSelection"))
|
||||||
|
TSoftObjectPtr<UlxServerSelection> ActiveServer;
|
||||||
|
};
|
||||||
Reference in New Issue
Block a user