FScreenshotRequest::RequestScreenshot(true);
if (GEngine)
GEngine->AddOnScreenDebugMessage(-1, 15.0f, FColor::Red, "Tried to take screenshot ");
}
As you can see on the docs it says:
Requests a new screenshot. Screenshot can be read from memory by subscribing to the ViewPort’s OnScreenshotCaptured delegate.
I try to do this without any success please help me.
UGameViewportClient::OnScreenshotCaptured().AddDynamic(this, &UMyBlueprintFunctionLibrary::OnScreenShotCaptured); this is not the right way i get the folowing error:
Error (active) class “TMulticastDelegate<void, int32, int32, const TArray<FColor, FDefaultAllocator> &>” has no member “__Internal_AddDynamic” ARtest d:\Unreal projects\ARtest\Source\ARtest\MyBlueprintFunctionLibrary.cpp 9
With this, the delegate works and triggers when the screenshot has been generated. Don’t ask me why it requires these parameters to work, but it just does.