How to take a screenshot including UI only using Blueprint?

Hello! I am trying to take screenshots to use for my save/load menu. I am working on a visual novel and I would like to have images saved of the game at the time of the save that includes the UI since most of the game happens in the UI.
The only solution I have found so far is to use the console command node to take a bugscreeshot, then I go and access the image and rename it to match the name of the save. However, if the screenshot takes too long to be taken then the timing gets missed and the screenshot isn’t renamed.

So what I would like to be able to do is take a screenshot that captures the UI/current game view and assign its name when the screenshot is taken rather than waiting for the screenshot to complete. Is there any way to do this using only blueprints? I am open to using a marketplace addin if one exists that does this.

3 Likes

Use the “Shot” console command.

The screen shot will show up in the Saved/Screenshots directory in PIE, or user appdata folder if installed.

You can also pass in a custom name in the HighResShot command:

Or, if you want to specify resolution and filename/path, use HighResShot with filename=:

7 Likes

Choose the one that suits you :face_with_monocle:

10 Likes

If your shipping builds disable console commands, this may depend on what your Console Class setting is in the Project Settings.
By default, the console works fine in shipping. There’s even a mobile shortcut for “show console” – four-finger tap.

I just built this exact project to release mode (on Windows) and pressed my screen shot key (F6, bound to Event Screen Shot) and the screen shot came out.
I could also press backtick, and the console rolled up, and I could execute the Shot command.

That being said, @Husky211 shows the Blueprint nodes that you can use if you don’t like the console, they do the same thing!

3 Likes

Hello! Thank you all so far for the replies, I’ve tried some of this out and still run into some issues.

@jwatte
I tried using the Shot and HighResShot commands but neither seem to capture the UI they just capture the camera view.

@Husky211
I tried using these but most of them don’t capture UI or for the capture UI one specifically I haven’t been able to locate the screenshots from it. The Log said the image was saved in the automation folder and I’ve gotten an image from the gameplay screenshot node to save there but this one specifically isn’t appearing.
Here are my settings for the node:

Also for more context on why capturing the UI is so important; the game happens almost entirely in widgets. It’s set up like a standard visual novel but the backgrounds are scene capture components that are applied to a layer of the UI widget. This is why I need to be able to capture the UI in my screenshot.

1 Like

you have a blueprint to get the save path “Screen shot dir”… 4 some reason dont work :confused:

Hmm, you may need to use a FScreenshotRequest for that to work then, which requires a smidgen of C++. You can build a C++ plugin that’s nothing but a Blueprint native function library, and then do the necessary in there.

request->RequestScreenshot("ScreenShot", true, false);

Assuming you have Visual Studio installed, and know at least some C++, it’s really quite easy to “add C++ class” and choose blueprint function library and then implement a single static function to do it.

Will this work without needing to compile my project? That’s the primary thing I’m trying to avoid is needing to compile the project. If I can just write this outside of UE and import it then that would actually work really well!

What do you mean by “compiling your project?”

The plugin that you make, has to be compiled. That happens just once, unless you change it again. Unreal Engine will make a visual studio project for your UE project, but that doesn’t mean that you have to invoke visual studio for anything other than if you change this plugin code that lives in C++. You don’t have to start the editor from visual studio, and you don’t have to have visual studio running to edit, run, or package your project.

Just for any future readers, you can execute shot showui to take a screenshot with UI.

3 Likes

@KristofMorva i have tried it and it worked perfectly fine for me but i want to change its saving directory (which is currently the project file saved screenshot folder) to my c:\ drive…How can i do this??

Hey, you should be able to do shot showui filename=/Your/Directory

1 Like

@KristofMorva
umm… don’t know like this…

Well, on Windows paths don’t start with /, so there you’d use something like C:/Users/YourUserName/AppData/Local/YourProductName.

Ok, it worked … thank you @KristofMorva for your help

Do you know if you can set the resolution on that as well? Or does showui work with HighResShot?
Thanks.

2 Likes

Hi, do you know where those nodes put the files? Cannot find them. Thanks.

Hey, as far as I can tell, you can’t combine them (low res has no resolution, high res has no showui).

1 Like

Lol, it’s almost like Epic is trolling all of us. I’ve been banging my head for days to find the best way to take a screnshot in game.

1 Like

@MessyHuman
Were you able to resolve this? None of the solutions mentioned in the thread are working for me and my “game” is set up similar to yours, all ran through HUD + Widgets.