|
|
|
|
| #pragma once
|
|
|
| #include "Engine/DeveloperSettingsBackedByCVars.h"
|
| #include "GameplayTagContainer.h"
|
| #include "LyraPlatformEmulationSettings.generated.h"
|
|
|
| struct FPropertyChangedEvent;
|
|
|
| |
| |
|
|
| UCLASS(config=EditorPerProjectUserSettings, MinimalAPI)
|
| class ULyraPlatformEmulationSettings : public UDeveloperSettingsBackedByCVars
|
| {
|
| GENERATED_BODY()
|
|
|
| public:
|
| ULyraPlatformEmulationSettings();
|
|
|
|
|
| virtual FName GetCategoryName() const override;
|
|
|
|
|
| FName GetPretendBaseDeviceProfile() const;
|
| FName GetPretendPlatformName() const;
|
|
|
| private:
|
| UPROPERTY(EditAnywhere, config, Category=PlatformEmulation, meta=(Categories="Input,Platform.Trait"))
|
| FGameplayTagContainer AdditionalPlatformTraitsToEnable;
|
|
|
| UPROPERTY(EditAnywhere, config, Category=PlatformEmulation, meta=(Categories="Input,Platform.Trait"))
|
| FGameplayTagContainer AdditionalPlatformTraitsToSuppress;
|
|
|
| UPROPERTY(EditAnywhere, config, Category=PlatformEmulation, meta=(GetOptions=GetKnownPlatformIds))
|
| FName PretendPlatform;
|
|
|
|
|
| UPROPERTY(EditAnywhere, config, Category=PlatformEmulation, meta=(GetOptions=GetKnownDeviceProfiles, EditCondition=bApplyDeviceProfilesInPIE))
|
| FName PretendBaseDeviceProfile;
|
|
|
|
|
|
|
|
|
| UPROPERTY(EditAnywhere, config, Category=PlatformEmulation, meta=(ConsoleVariable="Lyra.Settings.ApplyFrameRateSettingsInPIE"))
|
| bool bApplyFrameRateSettingsInPIE = false;
|
|
|
|
|
|
|
|
|
| UPROPERTY(EditAnywhere, config, Category=PlatformEmulation, meta=(ConsoleVariable="Lyra.Settings.ApplyFrontEndPerformanceOptionsInPIE"))
|
| bool bApplyFrontEndPerformanceOptionsInPIE = false;
|
|
|
|
|
| UPROPERTY(EditAnywhere, config, Category=PlatformEmulation, meta=(InlineEditConditionToggle, ConsoleVariable="Lyra.Settings.ApplyDeviceProfilesInPIE"))
|
| bool bApplyDeviceProfilesInPIE = false;
|
|
|
| #if WITH_EDITOR
|
| public:
|
|
|
| LYRAGAME_API void OnPlayInEditorStarted() const;
|
|
|
| private:
|
|
|
| FName LastAppliedPretendPlatform;
|
|
|
| private:
|
| void ApplySettings();
|
| void ChangeActivePretendPlatform(FName NewPlatformName);
|
| #endif
|
|
|
| public:
|
|
|
| #if WITH_EDITOR
|
| virtual void PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent) override;
|
| virtual void PostReloadConfig(FProperty* PropertyThatWasLoaded) override;
|
| virtual void PostInitProperties() override;
|
| #endif
|
|
|
|
|
| private:
|
| UFUNCTION()
|
| TArray<FName> GetKnownPlatformIds() const;
|
|
|
| UFUNCTION()
|
| TArray<FName> GetKnownDeviceProfiles() const;
|
|
|
| void PickReasonableBaseDeviceProfile();
|
| };
|
|
|