diff --git a/Source/Integration/LuprexEditorSettings.cpp b/Source/Integration/LuprexEditorSettings.cpp new file mode 100644 index 00000000..94fda7cf --- /dev/null +++ b/Source/Integration/LuprexEditorSettings.cpp @@ -0,0 +1 @@ +#include "LuprexEditorSettings.h" diff --git a/Source/Integration/ProjectSettings.h b/Source/Integration/LuprexEditorSettings.h similarity index 59% rename from Source/Integration/ProjectSettings.h rename to Source/Integration/LuprexEditorSettings.h index b3324793..1d692582 100644 --- a/Source/Integration/ProjectSettings.h +++ b/Source/Integration/LuprexEditorSettings.h @@ -3,7 +3,8 @@ #include "CoreMinimal.h" #include "Engine/DataAsset.h" #include "Engine/DeveloperSettings.h" -#include "ProjectSettings.generated.h" +#include "BreakToDebugger.h" +#include "LuprexEditorSettings.generated.h" UCLASS(BlueprintType) class INTEGRATION_API UlxServerSelection : public UPrimaryDataAsset @@ -18,17 +19,25 @@ public: FString Host; }; -UCLASS(Config=EditorPerProjectUserSettings, DefaultConfig, meta=(DisplayName="Server Settings")) -class INTEGRATION_API UlxProjectSettings : public UDeveloperSettings +UCLASS(Config=EditorPerProjectUserSettings, DefaultConfig, meta=(DisplayName="Luprex Editor Settings")) +class INTEGRATION_API UlxEditorSettings : 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"); } + virtual FName GetSectionName() const override { return TEXT("Settings"); } + // The server to connect to. You can add an option to the list by creating + // a new data asset of type 'lx Server Selection'. UPROPERTY(Config, EditAnywhere, BlueprintReadOnly, Category="Server", meta=(AllowedClasses="/Script/Integration.lxServerSelection")) TSoftObjectPtr ActiveServer; + + // If blueprint execution generates a log message of at least the following + // severity, the blueprint debugger will automatically pause with a breakpoint. + UPROPERTY(Config, EditAnywhere, Category="Debugging Tools") + ElxBreakToDebuggerThreshold BreakToDebuggerLogVerbosity; }; + diff --git a/Source/Integration/LuprexGameModeBase.cpp b/Source/Integration/LuprexGameModeBase.cpp index 57201882..8803cd6d 100644 --- a/Source/Integration/LuprexGameModeBase.cpp +++ b/Source/Integration/LuprexGameModeBase.cpp @@ -12,7 +12,7 @@ #include "Blueprint/WidgetBlueprintLibrary.h" #include "Kismet/GameplayStatics.h" #include "Engine/GameInstance.h" -#include "ProjectSettings.h" +#include "LuprexEditorSettings.h" #include "Common.h" #include "AnimQueue.h" @@ -215,7 +215,7 @@ void ALuprexGameModeBase::InitializeGlobalState() // Possibly tell the engine to connect to a server. if (Playing) { - UlxServerSelection* Server = GetDefault()->ActiveServer.LoadSynchronous(); + UlxServerSelection* Server = GetDefault()->ActiveServer.LoadSynchronous(); if (Server) { FString Host = Server->Host.TrimStartAndEnd(); if (!Host.IsEmpty()) { @@ -238,7 +238,7 @@ void ALuprexGameModeBase::InitializeGlobalState() // If somebody generates a log message that's severe enough, break to debugger. BreakToDebuggerLogVerbosityDevice.Reset( - new FlxBreakToDebuggerOutputDevice(BreakToDebuggerLogVerbosity)); + new FlxBreakToDebuggerOutputDevice(GetDefault()->BreakToDebuggerLogVerbosity)); } void ALuprexGameModeBase::EndPlay(const EEndPlayReason::Type EndPlayReason) diff --git a/Source/Integration/LuprexGameModeBase.h b/Source/Integration/LuprexGameModeBase.h index b395cf84..b38489db 100644 --- a/Source/Integration/LuprexGameModeBase.h +++ b/Source/Integration/LuprexGameModeBase.h @@ -68,10 +68,6 @@ public: UFUNCTION(BlueprintCallable, Category = "Luprex|Miscellaneous", meta = (WorldContext = "WorldContextObject")) static void TriggerReloadSource(const UObject *WorldContextObject); - // The sensitivity level at which a log message triggers a debugger breakpoint. - UPROPERTY(EditAnywhere, Category="Debugging Tools") - ElxBreakToDebuggerThreshold BreakToDebuggerLogVerbosity; - // Luprex socket system. TUniquePtr Sockets; diff --git a/Source/Integration/ProjectSettings.cpp b/Source/Integration/ProjectSettings.cpp deleted file mode 100644 index 84f01262..00000000 --- a/Source/Integration/ProjectSettings.cpp +++ /dev/null @@ -1 +0,0 @@ -#include "ProjectSettings.h"