diff --git a/Source/LyraGame/Player/LyraCheatManager.cpp b/Source/LyraGame/Player/LyraCheatManager.cpp index 36dac6e9..0ba3837d 100644 --- a/Source/LyraGame/Player/LyraCheatManager.cpp +++ b/Source/LyraGame/Player/LyraCheatManager.cpp @@ -13,6 +13,7 @@ #include "AbilitySystem/LyraAbilitySystemComponent.h" #include "AbilitySystemGlobals.h" #include "GameplayEffect.h" +#include "HighResScreenshot.h" #include "Character/LyraHealthComponent.h" #include "Character/LyraPawnExtensionComponent.h" #include "System/LyraSystemStatics.h" @@ -421,3 +422,16 @@ void ULyraCheatManager::UnlimitedHealth(int32 Enabled) } } } +void ULyraCheatManager::Singinwhale_StartScreenshotInterval(float IntervalSeconds) +{ + FTimerHandle _Handle = FTimerHandle(); + GetWorld()->GetTimerManager().SetTimer(_Handle, FTimerDelegate::CreateWeakLambda(this, [this]() + { + FHighResScreenshotConfig& HighResScreenshotConfig = GetHighResScreenshotConfig(); + HighResScreenshotConfig.bDumpBufferVisualizationTargets = true; + HighResScreenshotConfig.bDateTimeBasedNaming = true; + HighResScreenshotConfig.SetResolution(1920,1080); + HighResScreenshotConfig.SetHDRCapture(true); + FScreenshotRequest::RequestScreenshot(true); + }), IntervalSeconds, true, 0); +} \ No newline at end of file diff --git a/Source/LyraGame/Player/LyraCheatManager.h b/Source/LyraGame/Player/LyraCheatManager.h index f193078e..c00229ec 100644 --- a/Source/LyraGame/Player/LyraCheatManager.h +++ b/Source/LyraGame/Player/LyraCheatManager.h @@ -95,6 +95,9 @@ public: UFUNCTION(Exec, BlueprintAuthorityOnly) virtual void UnlimitedHealth(int32 Enabled = -1); + UFUNCTION(Exec) + void Singinwhale_StartScreenshotInterval(float IntervalSeconds); + protected: virtual void EnableDebugCamera() override;