The problem is in
void FScreenshotRequest::CreateViewportScreenShotFilename(FString& InOutFilename)
{
FString TypeName;
if(GIsDumpingMovie)
{
TypeName = TEXT("MovieFrame");
if(GIsDumpingMovie > 0)
{
// <=0:off (default), <0:remains on, >0:remains on for n frames (n is the number specified)
--GIsDumpingMovie;
}
}
else if(GIsHighResScreenshot)
{
TypeName = TEXT("HighresScreenshot");
}
else
{
TypeName = InOutFilename.IsEmpty() ? TEXT("ScreenShot") : InOutFilename;
}
check(!TypeName.IsEmpty());
//default to using the path that is given
InOutFilename = TypeName;
if (!TypeName.Contains(TEXT("/")))
{
InOutFilename = FPaths::ScreenShotDir() / TypeName;
}
}
that function is called by FScreenshotRequest::RequestScreenshot
FString GeneratedFilename = InFilename;
CreateViewportScreenShotFilename(GeneratedFilename);
Inside RequestScreenshot() it sets a private variable “FileName” that is used to take screenshots. Thus, for high res screenshots file name will be always “HighresScreenshot” and placed in a default directory. And there is no way to change it…
The only solution I’m thinking of is to subscribe to OnScreenshotCaptured delegate and replace files once screenshot is taken.