added screenshots cheat

This commit is contained in:
Manuel Wagner 2022-09-13 09:07:12 +02:00
parent 0c2a994eac
commit c194cfa1ea
2 changed files with 17 additions and 0 deletions

View File

@ -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);
}

View File

@ -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;