File size: 3,813 Bytes
1e67697 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 | // Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "Engine/DeveloperSettingsBackedByCVars.h"
#include "UObject/PrimaryAssetId.h"
#include "UObject/SoftObjectPath.h"
#include "LyraDeveloperSettings.generated.h"
struct FPropertyChangedEvent;
class ULyraExperienceDefinition;
UENUM()
enum class ECheatExecutionTime
{
// When the cheat manager is created
OnCheatManagerCreated,
// When a pawn is possessed by a player
OnPlayerPawnPossession
};
USTRUCT()
struct FLyraCheatToRun
{
GENERATED_BODY()
UPROPERTY(EditAnywhere)
ECheatExecutionTime Phase = ECheatExecutionTime::OnPlayerPawnPossession;
UPROPERTY(EditAnywhere)
FString Cheat;
};
/**
* Developer settings / editor cheats
*/
UCLASS(config=EditorPerProjectUserSettings, MinimalAPI)
class ULyraDeveloperSettings : public UDeveloperSettingsBackedByCVars
{
GENERATED_BODY()
public:
ULyraDeveloperSettings();
//~UDeveloperSettings interface
virtual FName GetCategoryName() const override;
//~End of UDeveloperSettings interface
public:
// The experience override to use for Play in Editor (if not set, the default for the world settings of the open map will be used)
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, config, Category=Lyra, meta=(AllowedTypes="LyraExperienceDefinition"))
FPrimaryAssetId ExperienceOverride;
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, config, Category=LyraBots, meta=(InlineEditConditionToggle))
bool bOverrideBotCount = false;
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, config, Category=LyraBots, meta=(EditCondition=bOverrideBotCount))
int32 OverrideNumPlayerBotsToSpawn = 0;
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, config, Category=LyraBots)
bool bAllowPlayerBotsToAttack = true;
// Do the full game flow when playing in the editor, or skip 'waiting for player' / etc... game phases?
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, config, Category=Lyra)
bool bTestFullGameFlowInPIE = false;
/**
* Should force feedback effects be played, even if the last input device was not a gamepad?
* The default behavior in Lyra is to only play force feedback if the most recent input device was a gamepad.
*/
UPROPERTY(config, EditAnywhere, Category = Lyra, meta = (ConsoleVariable = "LyraPC.ShouldAlwaysPlayForceFeedback"))
bool bShouldAlwaysPlayForceFeedback = false;
// Should game logic load cosmetic backgrounds in the editor or skip them for iteration speed?
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, config, Category=Lyra)
bool bSkipLoadingCosmeticBackgroundsInPIE = false;
// List of cheats to auto-run during 'play in editor'
UPROPERTY(config, EditAnywhere, Category=Lyra)
TArray<FLyraCheatToRun> CheatsToRun;
// Should messages broadcast through the gameplay message subsystem be logged?
UPROPERTY(config, EditAnywhere, Category=GameplayMessages, meta=(ConsoleVariable="GameplayMessageSubsystem.LogMessages"))
bool LogGameplayMessages = false;
#if WITH_EDITORONLY_DATA
/** A list of common maps that will be accessible via the editor detoolbar */
UPROPERTY(config, EditAnywhere, BlueprintReadOnly, Category=Maps, meta=(AllowedClasses="/Script/Engine.World"))
TArray<FSoftObjectPath> CommonEditorMaps;
#endif
#if WITH_EDITOR
public:
// Called by the editor engine to let us pop reminder notifications when cheats are active
LYRAGAME_API void OnPlayInEditorStarted() const;
private:
void ApplySettings();
#endif
public:
//~UObject interface
#if WITH_EDITOR
virtual void PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent) override;
virtual void PostReloadConfig(FProperty* PropertyThatWasLoaded) override;
virtual void PostInitProperties() override;
#endif
//~End of UObject interface
};
|