Back in 4.18 when we packaged a project that included a hotkey for taking highres screenshots those images were saved in the package folder in a new created folder for screenshots. Now that we are using 4.20, the screenshots are no longer being saved there and instead are being saved here:
C:\Users[User Name]\AppData\Local[Name of Project]\Saved\Screenshots\WindowsNoEditor\
Is there a way to change the location of where high res screenshots taken in game are saved?
Editor Pref > Level Editor > Misc > Screenshots > Save dir
Thank you for that info but that appears to only affect the location of screenshots saved while in the editor. I am trying to change the location of shots taken in a packaged project.
Did you ever find a solution to this?
Hi,
I used this code.
GetWorld()->GetGameViewport()->OnScreenshotCaptured().AddUObject(this, &AScreenShotMgr::OnScreenshotComplete);
void AScreenShotMgr::OnScreenshotComplete(int32 sizeX, int32 sizeY, const TArray<FColor>& Bitmap)
{
GetWorld()->GetGameViewport()->OnScreenshotCaptured().Remove(callbackHandle);
FIntPoint DestSize(sizeX, sizeY);
FString FileFullPath = screenshotDirectory + GetFilename() + ".png";
TArray<uint8> CompressedBitmap;
FImageUtils::CompressImageArray(DestSize.X, DestSize.Y, Bitmap, CompressedBitmap);
const bool bTree = true;
IFileManager::Get().MakeDirectory(*FPaths::GetPath(screenshotDirectory), bTree);
FFileHelper::SaveArrayToFile(CompressedBitmap, *FileFullPath);
}