Hey guys, so I’m trying to set up a system that allows users to save a high res screenshot (Basically a render) to a custom location. I’ve got the save dialog working, so I can get a custom path, but how would I go about grabbing a high resolution screenshot and saving it to that path? I found FViewport->TakeHighResScreenshot(), but it doesn’t let me define resolution or save location.
Hey, have a look at FScreenshotRequest in Engine\Source\Runtime\Engine\Public\UnrealClient.h:
/**
* Requests a new screenshot with a specific filename
*
* @param InFilename The filename to use
* @param bInShowUI Whether or not to show Slate UI
*/
static void RequestScreenshot( const FString& InFilename, bool bInShowUI );
GEngine->AddOnScreenDebugMessage(-1, 5.0f, FColor::Yellow, TEXT("Requesting screenshot")); // display message on window (to check that you are actually calling the lines below)
FString fileName("C:/path/to/folder/screenshot.png");
FScreenshotRequest::RequestScreenshot(fileName, false, false);