Add Editor Preference to control server selection

This commit is contained in:
2026-06-03 15:52:20 -04:00
parent d951d2ab61
commit 6658fb7940
12 changed files with 163 additions and 100 deletions

View 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;
};