Add Editor Preference to control server selection
This commit is contained in:
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