How use OnscreenshotCaptured delegate

HI, I’m try to execute some function in the exact moment when I finish to take a screenshot, to do that I saw that there is a delegate that are called ad the end of the screenshot.

to bind my function I use this code:

UGameViewportClient::OnscreenshotCaptured().AddDynamics(this, &NameOfmyClass::nameOfFuncion);

on the .cpp

I just dropped the response to this in another thread. Feel free to take a look:

In short, .h file needs:

static void ScreenshotCaptured(int32 Width, int32 Height, const TArray<FColor>& Bitmap);

.cpp file needs:

UGameViewportClient::OnScreenshotCaptured().AddStatic(&ScreenshotCaptured);

Very thankful you dug around and found this to begin with, but do you know how you could make use of this with a static function?

I have an Actor class that needs to make use of the output of the screenshot request, but static UProperties and delegates aren’t allowed. Do I just need to make a whole new static class?

I’m sorry but I did not test this with a static function. If you manage to get it to work please post it here for the community.